What do you know about Containers?

There are two types of container library available in java.
1. Collection: Collection category only holds one item in each location. This includes List and Set Interfaces.
a. List (ArrayList, Vector, LinkedList): A collection of elements, duplicates allowed.
b. Set (HashSet, LinkedHashSet, TreeSet): A collection of unique elements.
2. Map: The Map holds key-value pairs, rather like a mini database. We can look up on the basis of key. This includes Map interface.
a. Map (HashMap, HashTable, LinkedHashMap, TreeMap): A mapping of keys to values.

Related Post

No related posts

Comments

Leave a Reply