List myList = new ArrayList();
or with generics (Java 7 or later)
List<MyType> myList = new ArrayList<>();
or with generics (Old java versions)
List<MyType> myList = new ArrayList<MyType>();
More Related Contents:
- I need to create a list that has both colums 1 and 2 equal [closed]
- How do I remove repeated elements from ArrayList?
- How to sort a List/ArrayList?
- How do you cast a List of supertypes to a List of subtypes?
- How to remove duplicates from a list?
- How to randomize two ArrayLists in the same fashion?
- How can I sort a List alphabetically?
- How to convert a Map to List in Java?
- How do I convert a Map to List in Java?
- Define a fixed-size list in Java
- Difference between Arrays.asList(array) and new ArrayList(Arrays.asList(array))
- Java – generate Random range of specific numbers without duplication of those numbers – how to?
- How to copy Java Collections list
- Java List Sorting: Is there a way to keep a list permantly sorted automatically like TreeMap?
- How to shuffle an ArrayList [duplicate]
- How to search in a List of Java object
- How to get a reversed list view on a list in Java?
- Is there a no-duplicate List implementation out there?
- Print array without brackets and commas
- Create a List of primitive int?
- How to flatten all items from a nested Java Collection into a single List?
- ArrayList vs LinkedList from memory allocation perspective
- How to remove common values from two array lists
- Performance and Memory allocation comparison between List and Set
- Iterate through a possibly infinite amount of nested ArrayLists
- Converting array to list in Java
- Why does Collections.sort use Mergesort but Arrays.sort does not?
- Simple way to compare 2 ArrayLists
- JDK9 randomization on immutable sets and maps
- In what situations is the CopyOnWriteArrayList suitable? [duplicate]