It is a collection of collection classes in the java API. It can used to handle the data structure in java language or collection classes in java API used to manage the data very efficiently like inserting, deleting, updating, retrieving, sorting the data etc.
It is one of the standardized mechanisms which allow us to group multiple values either of same types or different type or both the types in a single variable with dynamic size in nature. This single variable is known as collection variable.
All the operations that we want to perform on a data such as searching, sorting, insertion, deletion etc. Before storing or moving the data to permanent memory location, can be performed by Java Collection Framework.
All the operations that we want to perform on a data such as searching, sorting, insertion, deletion etc. Before storing or moving the data to permanent memory location, can be performed by Java Collection Framework.
High-level diagram showing collection hierarchy
The Java collection framework is part of the java.util package and it has a collection interface on the top of the hierarchy. We can see the complete hierarchy below, List, Queue, and Set implements the Collection interface. The Map interface is not inherited from the Collection interface and unlike List, Queue, or Set, it operates on key/value pair.
Java Collections Main Entities
There are four interfaces in Java Collection Framework, and they are List, Queue, Set, and Map.
List
The List stores a sequence of elements. We can access any element by its position in the List. The List interface has three implementing classes; ArrayList, Vector, and LinkedList.
Queue
The Queue maintains the order of the elements; it follows FIFO (first in, first out) concept. The Queue interface has two implementing classes; LinkedList and PriorityQueue
Set
The set is a collection of unique elements, and it doesnÂt allow duplicate elements. The classes HashSet and LinkedHashSet
implements this interface, and extended by SortedSet
class extends this interface. TreeSet
implements SortedSet
.
Map
LinkedHashSet
implements this interface, and extended by SortedSet
class extends this interface. TreeSet
implements SortedSet
. Map
The Map interface is not inherited from the Collection interface. It is a collection of elements as key/value pair. The classes HashMap
and LinkedHashMap
implements this interface, and extended by SortedMap
class extends this interface. TreeMap
implements SortedMap.
HashMap
and LinkedHashMap
implements this interface, and extended by SortedMap
class extends this interface. TreeMap
implements SortedMap.Do you Know?
Progamming is what actually means ?What is software development ?
How we categorized software development in different manner.
C Programming
C Plus Plus
Python
Java Development
Web Designing
Javascript
Mysql
Oracle
C Plus Plus
Python
Java Development
Web Designing
Javascript
Mysql
Oracle
We cover all the programming concepts in various programming languages, this tutorials are very help full for bigener as well as Experience developer, for the ease of understanding we categorized programming in different manner likewise.