Consider the ArrayList and LinkedList classes of the standard library.
What abstract class do they extend?
What interface types does that abstract class implement? Draw a class diagram
Both ArrayList and LinkedList are two variants of List which is a dynamic collection of objects.
Both ArrayList and LinkedList extends from the parent class AbstractList<E>
The syntax is
public class ArrayList<E>
extends AbstractList<E>
implements List<E>, RandomAccess, Cloneable, Serializable
Here E represents the type of the element to be added in the list.
They implements the the interface called List<E> so that both of ArrayList and LinkedList can use the functions and properties of the List<E> inteface.
Get Answers For Free
Most questions answered within 1 hours.