1.
Collection :-
o If we want to represent a group of individual objects as a single entity then we
should go for Collection.
o Collection interface defines the most common methods which are applicable for
any Collection object.
In general collection interface is considered as root interface of Collection
framework.
o Note:- there is no concrete class which implements collection interface directly.
2. List :-
List is child interface of Collection.
o If we want to represent a group of individual objects as a single entity where
duplicates are allowed and insertion order preserved then we should go for List.
3. Set :-
o Set is child interface of Collection.
o If we want to represent a group of individual objects as a single entity where
duplicates are not allowed and insertion order are not preserved then we should go
for Set.
4. SortedSet :-
SortedSet is child interface of Set.
o If we want to represent a group of individual objects as a single entity where
duplicates are not allowed but all objects should be inserted according to some
sorting order then we should go for SortedSet
5. NavigableSet :-
It is the child interface of SortedSet.
It defines several methods for navigable purpose.
6. Queue:-
It is child interface of Collection.
If we want to represent a group of individual objects prior to processing
then we should go for Queue.
Ex: before sending a mail all mail id’s we have to store somewhere and in
which order we saved in the same order mail’s should be delivered(First in
First out) for this requirement
Queue concept is the best choice.
o Note:-
All the above interfaces (Collection, List, Set, SortedSet, NavigableSet
and Queue) meant for representing a group of individual objects.
If we want to represent a group of objects as key value pairs the we should
go for Map Interface.
7. Map
Map is not he child interface of Collection.
If we want to represent a group of individual objects as key value pairs
then we should go for Map. Ex : Roll no. Name
102 Shivaji
103 Anil
104 Chandra
Both key and value are objects.
Duplicated keys are not allowed but values can be duplicated.
8. SortedMap
It is the child interface of map.
If we want to represent a group of key value pairs according to some
sorting order of keys then we should go for SortedMap.
9. NavigableMap(I)
It is the child interface of sorted map, it defines
Several utility methods for navigation purpose.
TreeMap is the implementation class for NavigableMap.
https://javatechtube.blogspot.com/2019/03/spring-web-mvc-flow.html