0% found this document useful (0 votes)
6 views6 pages

Collections Java

Collections in Java document

Uploaded by

Bhavin Panchal
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views6 pages

Collections Java

Collections in Java document

Uploaded by

Bhavin Panchal
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
Collections in Java = © Introduction : * Group of individual objects which are represented as a single unit is known as a collection of objects. * In Java, Collection interface and Map interface are the two main “root” interfaces of Java collection classes. * Before the Collection framework was introduced, the standard methods for grouping Java objects were ONT NTR oe Se) aU elm LTS) collections had no common interface. * It is difficult for the users to remember all the different methods, syntax, present in every collection cae * Advantages of the Collection : * Increases performance by providing high- performance implementations of useful data structures and algorithms. * The API has a basic set of interfaces like Collection, Set, List, or Map, all the classes ArrayList, LinkedList, Aro CoLmeTTMTT )mSM CULM ROL) oT TNS UROL MLL 1 alors © * Herable Interface : * This is the root interface for the entire collection TeT\ Noli a * The collection interface extends the iterable interface, Therefore, all the interfaces and classes Tuy eum cla rele » The main functionality of this interface is to provide an iterator for the collections. Therefore, this interface contains only one abstract method which is MCLE Lolm = valss = * Collection Interface: * This interface extends the iterable interface and is implemented by all the classes in the collection framework. * This interface contains all the basic methods which every collection has like adding the data into the collection, removing the data. Be Ries Mites elem iy ut ialite Mm ML CUa rele} because these methods are implemented by all the classes irrespective of their style of implementation. Therefore, in short, we can say that this interface builds a foundation on which the collection classes Ele MTT tire ae This is a child interface of the collection interface. SUM claret om Ms (-elfer-ii-Ye MMM li Roma Say of-3 in which we can store all the ordered collections of the objects. This also allows duplicate data to be present in it. This list interface is implemented by various classes like ArrayList, Vector, Stack, etc. Since all the A foe OMe) UR SRS oem SE object with any of these classes. Pais

You might also like