Questions tagged as 'java'

1
answer

Iterator arraylist java

I have a doubt in this case and it is because when I go through this arraylist and filter it with an if it only shows me the data of the older person at the age that I put as a condition.. instead of showing me three people, I only shows the per...
asked by 26.11.2018 / 03:56
1
answer

Java Functional Methods

I am learning to use the functional programming of java 8 and I do not know why but I can not make the code work for me. The problem I have is that everything is fine until I want to assign 2 variables of the class, I can one, but when trying to...
asked by 28.11.2018 / 22:46
1
answer

Beginner Why does a variable result in 0?

I'm trying to solve this exercise to see if you can help me ... Encode a Java program that reads the temperatures for the month of January and calculate and display:    Average temperature    The lowest temperature    How many days have...
asked by 28.11.2018 / 21:58
1
answer

How to capture the Primary Key Duplicated error in Android (java) with SQLServer?

Is it possible to know that the error that occurs when inserting a record is due to a duplicate key error? I have a user registry in which the user is the primary key and I have it in try catch but when the user already exists it jumps to...
asked by 28.11.2018 / 14:51
1
answer

Collect the data entered in a single JOptionPane

I would like to know how I have to do to gather in a single JOptionPane all the values that I enter by keyboard and not one by one. I am starting to use the windows of the JOptionPane and I have not finished clarifying at all. Thanks! import...
asked by 23.11.2018 / 23:03
1
answer

Display an array of diagonals with even numbers

I have a problem that involves matrices, what I need to do is fill a matrix of N * M of dimension (that is, of a number n of columns and rows given by the user), with even numbers, which already huh got. My inconvenience is generated when I am g...
asked by 23.11.2018 / 03:00
1
answer

Pass a String matrix to Int and add its own values row by row

I'm new to Java. I have a matrix of type String of the following format: Mara,10,10,10,10,10,10,10 Mare,10,10,10,10,10,10,10 Mari,10,10,10,10,10,10,10 Maro,10,10,10,10,10,10,10 Maru,10,10,10,10,10,10,10 The code I have to g...
asked by 22.11.2018 / 21:32
1
answer

Increase the index in the for each

In this case I am filling an array with random numbers. When I use a normal for the index in each iteration increases one by one, but with the for each I can not do that. I attach the code Scanner lector = new Scanner(System.in); int...
asked by 24.11.2018 / 21:26
1
answer

Doubt: It is advisable to use a class not as an Entity but as Functionality?

Very good. I have a method that checks if all TextField is complete and that it returns a boolean based on that. My idea is that I want to use this method in several classes to do it with different windows (frames), since each one has dif...
asked by 01.12.2018 / 16:34
1
answer

Pass object of an activity to another Android

I'm looking for a way to pass an object to another activity. What I do is create it in an activity. And in the other I want to receive it and work with it. Try passing data by object data with intent.putExtra() but it is not the most p...
asked by 29.11.2018 / 14:06