Questions tagged as 'java'

3
answers

How to code a priority matrix? [closed]

I have to make a calculator, but I need to know how to encode the priority matrix, so that for example, first multiply and then add.     
asked by 23.08.2017 / 21:07
3
answers

Enter data by keyboard and send them as parameters to the constructor

My query is because I want to ask the user to enter by keyboard the student's data, and then use the parameters entered to send them to the Student constructor. What is the way to do this? Student.java public class Alumno { private Str...
asked by 13.01.2016 / 21:32
2
answers

Calculate the age of a person in Android Java

How can you obtain the age of a person having your birth date in Date format? DateFormat dateFormat = dateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); Date dob = dateFormat.parse("1989-10-10");     
asked by 29.09.2017 / 22:45
3
answers

NumberFormatException making parse

I have a method that receives a series of parameters, one of them is a value of type Float and when trying to cast it to a int it gives me failure and cascates the application. The error occurs in the third row of the method, where I decl...
asked by 29.05.2017 / 12:13
5
answers

Connection java Postgres in Netbeans

I would like to ask you a question, the truth is that I am new to this, I am a student of programming and I have a small project. I am currently doing a program where you can store the data of people, in NetBeans. My question is: How do I gen...
asked by 07.04.2016 / 22:18
2
answers

Refresh activity from a later activity

I have an app in which I launch a settings activity in which you can configure the w-fi and the url to show in the first activity. The problem is that, when you go back and return to the beginning app, the changes are not automatically shown. Ho...
asked by 26.07.2017 / 14:03
4
answers

Error java.lang.ArrayIndexOutOfBoundsException

It's something simple that I'm doing, I just try to ask for a size of a vector and then fill it in java. I wanted to do it as practice however at the time of running the program I showed error. I would like to know if someone could help me. This...
asked by 10.03.2018 / 03:58
2
answers

hashCode () returns the value of the integer, not its hashCode

I have a matrix like this, from which I want to obtain the codes hash of all its elements: Integer[][] { { 1, 2, 3 }, { 1, 2, 3 }, { 1, 2, 3 }, { 1, 2, 2 } }; I go through it with a loop and I do .hashCode() of each element...
asked by 10.03.2018 / 22:47
2
answers

Help with android studio various activitys, obtaining data

I have a program of 2 activities, the initial activity is a log that connects to a bd by remote control, establishes the connection if the user and password are correct. Now in activity two I need you to show me in a TextView the name...
asked by 10.11.2016 / 11:43
2
answers

Find repeated items in a list

I have a LinkedList in java and I would like to store items that are repeated in the container in another container, How could I find out? Any clues? public Set<Cancion> dameCancionesRepetidas(){ SortedSet<Cancion> can...
asked by 28.11.2016 / 19:09