I am trying to solve a problem. I have a
ArrayList<Personas> and I want to collect all the records that I have in the field
numeroPersonas and generate another
ArrayList . First I created a
ArrayList<String> to collect the different data that exist in that field and know how many data I have different. The problem comes when I have to copy an object that exists in my ArrayList all to generate another ArrayList group1 , group2 , etc. How can I pick up an object of
ArrayList and save it in another
ArrayList . I would go through one and if it meets some requirements, save it in another.
(It is a quick explanation of the problem since it is an ArrayList with 10000 records that will have around 100 different numbers in that field and I have to generate an object and then call a method to generate a pdf with the object. which would be to go through my
ArrayList_principal - > generate my
ArrayList<Personas>_grupo1 call the method passing it as parameter my arrayList and so on until I finish with the groups that I will pick up in an array the codes that I have)
Thank you very much for your time.