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...

Why string is popular hashmap key in java?

Answer Posted / vishalshetkar

Since String is immutable, its hashcode is cached at the time of creation and it doesn’t need to be calculated again. This makes it a great candidate for keys in a Map and its processing is fast than other HashMap key objects. This is why String is mostly used Object as HashMap keys.

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 nullpointerexception in java?

1140


What do you mean by ordered and sorted in collections in java?

989


What is google full form?

1008


Define Multiprogramming and Multiprocessing in java.

1140


What is meant by call by reference?

1004


please send me hr interview questions in it industry

2120


Is the empty set a singleton?

971


What are format specifiers in java?

1052


How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

1023


Explain about join() method?

960


What do heavy weight components mean in java programming?

945


How is the marker interface used in Java?

1094


What are the Main functions of Java?

1088


What is void in java?

1072


What are the methods available in a class?

1074