June 2004
Intermediate to advanced
848 pages
21h 28m
English
JDK 1.2 introduced support for Collections, also known as “container classes.” There are two basic interfaces that extend Collection in different directions, Set and List.
A List is a collection that has an order associated with its elements. That order is the order in which the elements were added to the collection. There does not need to be any logical relationship between elements.
The List interface is implemented by two concrete classes, LinkedList and ArrayList. LinkedList is a doubly linked list. The time to access elements depends on where they are in the list, but there is no overhead to growing or shrinking the collection. ArrayList is a list stored as an array. It provides quick access to any element, ...
Read now
Unlock full access