Originally Posted by GregBrannon
So sorry for not being able to explain my point! Yes list array == ArrayList.
Here is exactly what I'm doing: I have an Array of type Object with some strings, I passed that array to a method where some calculations are done to group similar strings together. The output of that method is an ArrayList of type int. Now, I'm trying to loop through the int that are inside the list and then I'm using an inner loop to loop through each element of those arrays. What I want to get as a result is the strings grouped based on the indices that are in the int.
So I tried using an ArrayList of type String, and also tried the Set of type String to store the strings instead of their indices. What I'm seeing is that my loop adds the Strings to the Set or the ArrayList and keeps on adding the new values after each loop. While what I want to achieve is just adding only the Strings of specific indices. I hope I explained myself better this time. Looking forward hearing your comments.