Free Source Code and Tutorials

Custom Search

The Collection Classes:

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:

SN Classes with Description
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.

The AbstractCollection, AbstractSet, AbstractList, AbstractSequentialList and AbstractMap classes provide skeletal implementations of the core collection interfaces, to minimize the effort required to implement them.

Facebook Comments
(Visited 1 times, 1 visits today)
Share this

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked * © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!

%d bloggers like this: