Questions tagged as 'java'

2
answers

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5

I am learning basic programming in Java and when I try to go through a array one-dimensional I get this error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 at Array_2.main(Array_2.java:6) And I rea...
asked by 08.12.2018 / 00:31
1
answer

Google Address Autocomplete (Android Studio)

Good morning I THINK I have an error in the method getAutocompletePredictions since the error that comes out in a toast when writing in the autocomplete of the app comes out Error : status{statusCode=ERROR, resolution=null} . Everyt...
asked by 12.12.2018 / 13:10
1
answer

How to enter arrays by keyboard and how to initialize them in the main? Java Poo

Good I'm doing a program where I must (enter the name and the note of some students) make 2 arrays one of the String type and another of the float type. I have a problem in the main when I want to enter the student data by console. First I put t...
asked by 08.12.2018 / 02:52
1
answer

How to make a matrix that already contains data? [closed]

In my review I was told that with the values contained in the table that was printed on a sheet I would get an arrangement with its percentages. My question is how do I create a matrix with those same values and then put percentages in an array....
asked by 12.12.2018 / 06:11
2
answers

How can I fill an ArrayList with an object of an already created class

I tell you that I have two classes, a class of Task type and another of type Person, within the attributes of type person, has an ArrayList of Task type, when I create an object of Task type, and when filling this object with its attributes....
asked by 27.11.2018 / 20:29
1
answer

Does this program comply with your slogan? Java Arrays [closed]

I was doing this arrays program: Write a line of code that declares an array type char and initialize it with the string constant “Estudiando cadenas” . The array must have a size that allows you to save the string without a...
asked by 26.11.2018 / 23:34
2
answers

Parameters in anonymous classes

I have the next anonymous class ActionListener seleccionYo= new ActionListener(){ @Override public void actionPerformed(ActionEvent ae, Hero hero, Yo yo){ hero = new Yo("Oscar", 2, 0, 1000, 50, 25, 5, false...
asked by 16.11.2018 / 01:11
1
answer

Error when trying to print vectors (they change their values)

I have problems when printing some vectors. I must fill 2 vectors of 5 positions each, then go through those vectors and if there are repeated values exchange those values repeated by -1, but keeping one of them and storing that modified vect...
asked by 16.11.2018 / 05:18
1
answer

Do you not upload the data from my database to my jsp?

The database is locally I understand that it is placed the libraries are already placed from jdbc and the jar of mysql but does not pull the data     
asked by 14.12.2016 / 17:31
1
answer

Doubt in exercise in java

I'm with the following exercise, and I'll put you where I got stuck, if you can give me a cable. Exercise 2 Create a project Appliances, in it a package with the same name and an Appliances class (in singular) that includes public class...
asked by 20.11.2018 / 19:22