Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to implement Hash Map?

Answer Posted / brijendra-java (xavient)

HashMap is the implementaion of Map interface.
HashMap is key value pair storage concept.
HasMap does not allow duplicate key but value may be any
thing.
HasMap allow both key and Valuea as NULL.
HasMap is the Unordered collection.
When we change the iteration of HasMap then it give
concurrent Modification error.
HasMap is NonSyncronised class.

HashMap hMap = new HashMap();
hMap.put(Null, Null);
hMap.put(1, a);
hMap.put(2, b);
hMap.put(3, c);
system.out.println("Size"+hMap.size());

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is @qualifier in java?

906


What is the use of servlet in java?

892


How can the static main method use instance variables?

928


Where is java installed?

820


Explain suspend() method under thread class>

973


Write a class which checks whether a given number is prime or not. Write another class to implement the behavior of previous class and print the series of twin prime number upto a given range.

1797


In an htm form i have a button which makes us to open another page in 15sec.how will you do that?

1726


What is java persistence api used for?

858


What is java aop?

831


How do I enable javascript?

942


What is meant by code profiling?

913


What is jpa implementation?

834


Do I need both jdk and jre?

944


How does java handle integer overflows and underflows?

961


Is jdk an ide?

860