Questions tagged as 'arraylist'

2
answers

Concatenating an array List in a listView?

I wonder if there is a way to add "strings" to display in a listView so that I do not have to impose conditions and conditions again strings already used: package genesysgeneration.list; import android.support.v7.app.AppCompatActivity;...
asked by 16.02.2017 / 00:25
1
answer

ArrayList giving error

I'm doing a database program and I'm not able to make my list appear in jtable . I created the method and at the time I call it my method of error, can someone help me the code is down there? Error:    Exception in thread "AWT-EventQ...
asked by 05.03.2017 / 15:40
1
answer

Display only results that satisfy the condition within the loop

I am building a small algorithm that traverses a ArrayList and compares the value found with a value entered by the user. But I want to print on the screen only the value that satisfies the operation, not the other values that do not m...
asked by 09.09.2018 / 22:24
2
answers

Code with JDBC fails with exception

I'm trying to search the database through java. I'm using this code, but entering the exception: public ArrayList<Pessoas> pesquisar(String nome) { ArrayList<Pessoas> lista = new ArrayList<Pessoas>(); try(Connectio...
asked by 25.11.2017 / 00:51
1
answer

How to present data in the ArrayList in Java [duplicate]

How do I sort information stored in an ArrayList in java? Follow the code for review. public class Main { public static void main(String[] args) { Aluno aluno = new Aluno(); ArrayList<Aluno> array_aluno = new ArrayL...
asked by 22.02.2018 / 18:37
1
answer

Null object in array - Android Base adapter

Hello I was doing a gallery, I created the Adapter, it worked normally, then proceed to the step of listing files in a directory and then put it in the list: ArrayList<GalleryItem>items = new ArrayList<>(); File pa...
asked by 18.01.2018 / 15:23
1
answer

Can not deserialize instance of java.util.ArrayList out of START_OBJECT token

Using angular, I am not able to insert an array of genres into the Gender property that is in the Manga object. Using postman to insert the Generos array into the API / manga would look like this. { "nome": "BORUTO", "status": "...
asked by 20.11.2017 / 16:31
1
answer

ArrayList, Collections

I have a list of exercises on ArrayList, but only the first question has left me with several doubts: Implement an interface with abstract methods getNome, getValor, which should be implemented in the concrete Currency class. The currency cl...
asked by 30.08.2017 / 20:54
1
answer

Arraylist does not display correct [duplicate]

I have a super class Person with 2 sub classes (Student and Teacher). However I made another "List" class to create the ArrayList and later handle everything. At the time of using the List the data is accepted but when I try to read the con...
asked by 17.06.2017 / 20:37
1
answer

Store value in an ArrayList ArrayList

Hello, I have a question regarding storing the value I get from a table in an arraylist from arraylist. How should I do to store? For example: Private ArrayList<ArrayList<String>> valorMatriz = new ArrayList<ArrayList<Stri...
asked by 21.07.2016 / 20:58