A List maintains the insertion order and allows duplicate elements.

Common Implementations

ImplementationFeaturesBest For
ArrayList<E>Dynamic array, fast random accessRead-heavy operations
LinkedList<E>Doubly linked list, fast insert/deleteFrequent additions/removals
Vector<E>Synchronized version of ArrayListThread-safe access
Stack<E>LIFO (Last In, First Out) stackStack operations

Example: Using ArrayList

import java.util.ArrayList;
import java.util.List;
 
public class ListExample {
    public static void main(String[] args) {
        List<String> names = new ArrayList<>();
        names.add("Alice");
        names.add("Bob");
        names.add("Alice");  // Duplicates allowed
 
        System.out.println(names);  // Output: [Alice, Bob, Alice]
    }
}