in Core Java

Map in Java – HashMap Java example

Map in Java

Map in java has a key and value pair objects.
The combination of this Key and value pair is called an ENTRY
With respect to Hierarchy, Map does not come under normal collections.
The reason is, All other collections like List, Set, Queue deal with elements where there is a single object at a level,
Where as Map works with key value pairs.
Due to this new model, Map needs differnt set of methods to work with entries and this is the reason why Map does not
extend collection interface.
One of the Important rules we got to remember while using Map based datastructures is that
– They do not allow duplicates as part of the keys.
In this video tutorial, i have explianed the concept of Map and its concrete implementation with HashMap Example
I have also mentiond about HashTable and how it is synchronized.

HashMap in java Example:

Owner.java

 

 

Srinivas Reddy

Srinivas Reddy

An IT - Specialist with loads of experience in Java, J2ee platforms and loves to share his experience on technology with You...

More Posts - Website

Follow Me:
TwitterFacebook

Related Posts

Srinivas Reddy
Written By:

An IT - Specialist with loads of experience in Java, J2ee platforms and loves to share his experience on technology with You...