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

Can Anybody tell the diff b/w jdk1.6 and latest version.

2 Answers  


how can i take the inputs from users in java program?

7 Answers   Wipro,


Why do we need data structure in java?

0 Answers  


Explain the importance of finalize() method.

0 Answers  


Differentiate between nested and inner class in java.

0 Answers   Akamai Technologies,


Difference between keyword and identifier.

0 Answers   TCS,


Which collection object is faster to retrieving the data and inserting the data into it.

2 Answers   Jamcracker, Virtusa,


What is the final method?

0 Answers  


What is an Exception ?

10 Answers  


What are peerless components?

0 Answers  


wahts is mean by thread?

22 Answers   HCL, TCS,


Hi Friends, can u give code to convert ArrayList to HashMap and HashMap to ArrayList.

1 Answers  


Categories