List
List The List interface is a part of the Java Collections Framework and represents an ordered collection that can contain duplicate elements. Unlike Set, a List maintains the order in which elements are inserted and allows for random access to its elements via an index. Key Implementations of List ArrayList: An ArrayList is a resizable array implementation of the List interface. It provides fast random access to elements but can be slower when adding or removing elements at arbitrary positions (except at the end). List<String> names = new ArrayList<>(); names.add("Alice"); names.add("Bob"); 2. **LinkedList**: * A `LinkedList` is a doubly linked list implementation of the `List` interface. It offers better performance than `ArrayList` when adding or removing elements from the beginning or middle of the list. ```java List<String> names = new LinkedList<>(); names.add("Alice"); names.add("Bob"); Vector: ...