There are two "groups" of interfaces:
Collection
's and Map
's.
Here is a graphical overview of the
Collection
interface hierarchy:Collection Subtypes
The following interfaces (collection types) extends the Collection interface:
- List
- Set
- SortedSet
- NavigableSet
- Queue
- Deque
Instance Creations:
1.List
List listA = new ArrayList(); List listB = new LinkedList(); List listC = new Vector(); List listD = new Stack();2.Set
Set setA = new EnumSet(); Set setB = new HashSet(); Set setC = new LinkedHashSet(); Set setD = new TreeSet();3.SortedSet
SortedSet setA = new TreeSet(); Comparator comparator = new MyComparator(); SortedSet setB = new TreeSet(comparator);4.NavigableSet
NavigableSet original = new TreeSet();