Questions tagged as 'arraylist'

1
answer

Go through Arraylist from object objects and compare them to C #

I was wondering how I can reuse the object that I put in an array list because I can not compare it to anything, and how do I compare an object that is inside it with another, in that college program the goal was to user to put the number of sha...
asked by 17.10.2017 / 12:05
1
answer

Add Contacts to an Array List

I would like to add contacts to a ArrayList , but adding initial values to the attribute. First I created a Contact Call class, and I want to create a contact type ArrayList and would like to know how to add data to this ArrayList Th...
asked by 20.08.2017 / 20:42
1
answer

Read Json without having to "know" the JAVA keys

The problem is that I need to inform the professions and I wanted the json reading to be automatic without having to report ocup[1] = "jornalista" . I would like the json reading to be automatic. { "profissao": { "jornalista": [...
asked by 28.08.2017 / 13:29
1
answer

JSON for PHP + MYSQL

My client sent me this JSON so I can loop and write the data in Mysql. I just can not get it because it's different from what I work on; Someone can give me some hint and what is the difference from one format to another. Error presented i...
asked by 06.06.2018 / 16:58
1
answer

Calling an ArrayList from one JFrame to another

I need to call a ArrayList created in JFrame to another JFrame . In this case, the user would make a record in one of the JFrames, called Cadastre, and from this would create the User object, with login and password and this...
asked by 18.10.2015 / 04:20
2
answers

How to store data from a .txt file in an object - Java

I'm a beginner in programming and I'm making a small application that should register products, delete, edit, organize, track inventory, cost price, sales price, profit margin, etc. So far I've been able to get a .txt file to store the object...
asked by 16.12.2015 / 03:36
1
answer

Is it possible to convert an ArrayListDouble to ArrayListInteger?

So, guys, I wonder if there is and how to convert a ArrayList<Double> to a ArrayList<Integer> ?     
asked by 10.11.2017 / 19:37
1
answer

How to sort a list in alphabetical order? [duplicate]

I have List<ListaUsuarios> and I want to sort it alphabetically by name My code is like this User class: public class Usuario{ private String nome; private String empresa; private int idade; private Strin...
asked by 13.11.2017 / 19:54
2
answers

How to display information about objects in my ArrayList?

I want to create a ArrayList to store information about students (name, typing number and status) but I can not get ArrayListadded the information. The code I have is the following: Turma.java package turma; public class Aluno {...
asked by 29.05.2017 / 20:10
2
answers

Search in an ArrayList in Java

I'm trying to do a search using .contains(); of ArrayList , but I can not return. It is option 3 public class Fruteira { public static void main(String[] args) { Scanner input = new Scanner(System.in); List<Fr...
asked by 04.12.2017 / 19:15