It depends on the List
implementation. Since you index arrays with int
s, an ArrayList
can’t hold more than Integer.MAX_VALUE
elements. A LinkedList
isn’t limited in the same way, though, and can contain any amount of elements.
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
- How do I remove repeated elements from ArrayList?
- Sorting an ArrayList of objects using a custom sorting order
- 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
- ArrayList initial capacity and IndexOutOfBoundsException [duplicate]
- increase the java heap size permanently?
- Modifier static is only allowed in constant variable declarations
- How to convert a String into an ArrayList?
- ArrayList filter [duplicate]
- Searching in a ArrayList with custom objects for certain strings
- java.util.Vector – alternatives
- Fastest way to recreate the ArrayList in a for loop
- Where can I find default -Xss (stack size) value for Oracle JVM?
- ArrayList or List declaration in Java
- Arrays.asList() of an array
- How does ArrayList work?
- Better way to find index of item in ArrayList?
- Java PriorityQueue with fixed size
- How to remove common values from two array lists
- Java generics – ArrayList initialization
- How to pass ArrayList using putStringArrayListExtra()
- What is the difference between ArrayList.clear() and ArrayList.removeAll()?