Posts

Showing posts with the label Collection framework in java with example

collection framework in java with example

Image
Collection framework is a class library to handle group of objects. Collection framework implemented in java.util package. A collection object or container object is an object which can store a group of other objects. A collection object has a class called ' Collection class ' or ' Container class '. All the collections classes are available in the package java.util (util stands for utility). A group of collection classes are called a ' Collection Framework '. The above diagram represents the hierarchy of Collection Framework and the list of available interfaces with their implementation classes. How can we handle a group of elements? We use an array to store a group of elements and handle them easily. How can we handle a group of objects? How can we use an array to store a group of objects? Yes, it is possible to use an array to store a group of objects. Using an array to store a group of objects: