Instantiate a new ArrayList:
List<String> myList = new ArrayList<String>();
Iterate over your data structure (with a for loop, for instance, more details on your code would help.) and for each element (yourElement):
myList.add(yourElement);
More Related Contents:
- Removing duplicates from arraylist using set
- How to check two array list are same content in same position
- Logical disjunction of a list of booleans represented by integers [closed]
- ArrayList remove methods [closed]
- Assign ArrayList to File[] in java
- ArrayList, Loop and requisite if can not work that i want – Java 11
- Android String that change every day
- How do I remove repeated elements from ArrayList?
- Sorting an ArrayList of objects using a custom sorting order
- Best way to convert an ArrayList to a string
- How to convert an ArrayList containing Integers to primitive int array?
- How does a ArrayList’s contains() method evaluate objects?
- Common elements in two lists
- Concurrent Modification Exception : adding to an ArrayList
- How to sort an ArrayList in Java [duplicate]
- Java ArrayList copy
- ArrayList initial capacity and IndexOutOfBoundsException [duplicate]
- Convert ArrayList into 2D array containing varying lengths of arrays
- How to efficiently remove all null elements from a ArrayList or String Array?
- Count occurrences of words in ArrayList [duplicate]
- Java – How Can I Write My ArrayList to a file, and Read (load) that file to the original ArrayList?
- Print ArrayList
- Correct way to synchronize ArrayList in java
- ArrayList filter [duplicate]
- Check if a value exists in ArrayList
- Sum all the elements java arraylist
- How does ArrayList work?
- Java ArrayList how to add elements at the beginning
- Vector vs Collections.synchronizedList(ArrayList)
- Remove object from ArrayList with some Object property