Interface: List(publicinterfaceList<E> extendsCollection<E> ) The <tt>List</tt> interfaceprovides two methods to search for a specified object. From a performance standpoint, these methods should be used with caution. In many implementations they will perform costly linear searches.
Abstract class: AbstractList(publicabstractclassAbstractList<E> extendsAbstractCollection<E> implementsList<E>) To implement an unmodifiable list, the programmer needs only to extend thisclassand provide implementations for the {@link #get(int)} and {@link List#size() size()} methods.
To implement a modifiable list, the programmer must additionally override the {@link #set(int, Object) set(int, E)} method (which otherwise throws an {@code UnsupportedOperationException}). If the list is variable-size the programmer must additionally override the {@link #add(int, Object) add(int, E)} and {@link #remove(int)} methods.
// The array buffer into which the elements of the ArrayList are stored. // The capacity of the ArrayList is the length of this array buffer. // Any empty ArrayList with elementData == DEFAULTCAPACITY_EMPTY_ELEMENTDATA // will be expanded to DEFAULT_CAPACITY when the first element is added. transient Object[] elementData; // non-private to simplify nested class access