Questions tagged as 'java'

4
answers

Problems with a Loop

Hello, you previously helped me with this part of my code: public static void Lista(String textList) { String[]stList= textList.split(","); Arrays.asList(stList); for(int i = 0; i < stList.length; i++){...
asked by 04.05.2018 / 23:51
1
answer

Why does this error happen inside this constructor? (JAVA)

I am learning Java programming, I am already starting with object-oriented programming, and when I was reviewing a code for an exam I had a question that I could not find why it happens. I have the following class: class Vehicle{ int x; V...
asked by 07.09.2018 / 18:48
2
answers

Problem with Java scanner

Good morning, I'm doing a small project to work with hospital patients. My problem arises when I want to receive data by keyboard. What code do I have? _ //Get nombre System.out.println("Introduzca nombre del paciente");...
asked by 31.03.2017 / 20:32
3
answers

Switch structure to avoid showing statements

I have this little code in java / I'm starting to learn / package com.switchtuto; import java.util.Scanner; public class switchcase2 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.p...
asked by 14.09.2016 / 05:15
2
answers

Select values from two different Java.Sql tables?

Hello, I am trying to create a method that returns me% String[] with the data from 2 different tables in this case is the table user and the table geolocation , the data of the user with its respective geolocation (city , nei...
asked by 11.10.2016 / 17:18
3
answers

How do I deactivate all the elements of a jpanel? in java

I try it this way: jPanel.setEnabled(false); But it does not work. Is there another option?     
asked by 29.08.2017 / 23:05
2
answers

Refresh query of a JSON every X seconds

The following Activity gets the data of a file in PHP that generates a JSON with the data obtained from MYSQL , I am new in this JAVA ANDROID , and I have little experience in PHP , I barely defend myself,...
asked by 18.01.2016 / 02:26
1
answer

Class ArrayList repeats the same value

I have a ArrayList of class, when loading it in the following way: ArrayList<Diccionario> puertaHabitacion= new ArrayList<Diccionario>(); Diccionario puertaHab=new Diccionario(); puertaHab.setClave("Puerta Cocina"); puertaH...
asked by 04.01.2019 / 11:56
1
answer

What are the wrappers variables for?

In what kind of circumstances can you apply? Example: // Inicializar Primitivos int i1 = 12; int i2 = 300; long l1 = 200L; // sufijo para primitivo long long l2 = 200l; // sufijo para primitivo long long l3 = 200; float f1 = 1e-39F;...
asked by 18.10.2018 / 18:17
1
answer

How to send data from one Fragment to another Fragment?

I have created an application where I create 3 Fragments which I visualize with tabs and I want to send information from one fragment to another .. but I do not know what I'm wrong with as it does not mark a code error, but when I click on it bu...
asked by 14.10.2018 / 19:53