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


Sample code to retrieve objects from HashMap in sorted
ascending order?

Answers were Sorted based on User's Feedback



Sample code to retrieve objects from HashMap in sorted ascending order?..

Answer / murli

Map hm = new HashMap();
//add values to hashmap
Map tm = new TreeMap(hm);
//Iterate keySet in tm

Is This Answer Correct ?    9 Yes 2 No

Sample code to retrieve objects from HashMap in sorted ascending order?..

Answer / amit badgujar

Yes it is correct

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between serializable and externalizable interface?

0 Answers  


Why can't we make a class private in java?

0 Answers  


What is a class in java?

0 Answers  


Which is the best sorting technique in java?

0 Answers  


What do you understand by the term string pool?

0 Answers  


What is deserialization?

0 Answers  


where the static methods will live ,on stack ? can you explain brefly

1 Answers  


What is java command?

0 Answers  


How to sort an array in java without using sort method?

0 Answers  


Who found java?

0 Answers  


What is the difference between Object and Instance?

5 Answers   TCS,


What is a variable and constant?

0 Answers  


Categories