Sunday, January 8, 2012

The Collection Classes:


Java provides a set of standard collection classes that implement Collection interfaces. Some of the classes provide full implementations that can be used as-is and others are abstract class, providing skeletal implementations that are used as starting points for creating concrete collections.

The standard collection classes are summarized in the following table:



1 AbstractCollection
Implements most of the Collection interface.

2 AbstractList
Extends AbstractCollection and implements most of the List interface.

3 AbstractSequentialList
Extends AbstractList for use by a collection that uses sequential rather than random access of its elements.

4 LinkedList
Implements a linked list by extending AbstractSequentialList.

5 ArrayList
Implements a dynamic array by extending AbstractList.

6 AbstractSet
Extends AbstractCollection and implements most of the Set interface.

7 HashSet
Extends AbstractSet for use with a hash table.

8 LinkedHashSet
Extends HashSet to allow insertion-order iterations.

9 TreeSet
Implements a set stored in a tree. Extends AbstractSet.

10 AbstractMap
Implements most of the Map interface.

11 HashMap
Extends AbstractMap to use a hash table.

12 TreeMap
Extends AbstractMap to use a tree.

13 WeakHashMap
Extends AbstractMap to use a hash table with weak keys.

14 LinkedHashMap
Extends HashMap to allow insertion-order iterations.

15 IdentityHashMap
Extends AbstractMap and uses reference equality when comparing documents.

No comments:

Post a Comment

How to find the most appropriate Keywords?

  🔍 Step 1: Understand Your Business and Audience Define your products, services, or content . Identify your target audien...