0% found this document useful (0 votes)
329 views2 pages

Java Collection Framework

The Java Collection Framework provides standardized interfaces and classes for organizing and manipulating groups of objects. It includes interfaces like Collection, Set, List, and Map that define different types of object groupings. Classes like ArrayList, LinkedList, HashSet, and HashMap implement these interfaces to provide specific data structures. The framework offers a consistent way to work with collections without needing different procedures for each implementation.

Uploaded by

vishaltambolkar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
329 views2 pages

Java Collection Framework

The Java Collection Framework provides standardized interfaces and classes for organizing and manipulating groups of objects. It includes interfaces like Collection, Set, List, and Map that define different types of object groupings. Classes like ArrayList, LinkedList, HashSet, and HashMap implement these interfaces to provide specific data structures. The framework offers a consistent way to work with collections without needing different procedures for each implementation.

Uploaded by

vishaltambolkar
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 2

Java Collection Framework

We have tried you to make a walk through the Collection Framework. The Collection
Framework provides a well-designed set if interface and classes for sorting and
manipulating groups of data as a single unit, a collection.

The Collection Framework provides a standard programming interface to many of the


most common abstractions, without burdening the programmer with too many
procedures and interfaces.

The Collection Framework is made up of a set of interfaces for working with the
groups of objects. The different interfaces describe the different types of groups. For
the most part, once you understand the interfaces, you understand the framework.
While you always need to create specific, implementations of the interfaces, access
to the actual collection should be restricted to the use of the interface methods, thus
allowing you to change the underlying data structure, without altering the rest of
your code.

In the Collections Framework, the interfaces Map and Collection are distinct with no
lineage in the hierarchy. The typical application of map is to provide access to values
stored by keys.

When designing software with the Collection Framework, it is useful to remember the
following hierarchical relationship of the four basic interfaces of the framework.

• The Collection interface is a group of objects, with duplicates allowed.


• Set extends Collection but forbids duplicates.
• List extends Collection also, allows duplicates and introduces positional
indexing.
• Map extends neither Set nor Collection

Interface Imlementation Historical

Set HashSet TreeSet

Vector
List ArrayList LinkedList
Stack
Hashtable
Map HashMap Treemap
Properties
The historical collection classes are called such because they have been
around since 1.0 release of the java class libraries. If you are moving from
historical collection to the new framework classes, one of the primary
differences is that all operations are synchronized with the new classes. While
you can add synchronization to the new classes, you cannot remove from the
old.

Explore the Interface and Classes of Java Collection Framework

Collection Interface
Iterator Interface
Set Interface
List Interface
ListIterator Interface
Map Interface
SortedSet Interface
SortedMap Interface
HashSet & TreeSet Classes
ArrayList & LinkedList Classes
HashMap & Treemap Classes
Vector and Stack Classes

You might also like