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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How list contains works in java?

924


Why do we use variables?

926


What do you mean by access modifier?

967


Is this valid in java ? Can we instantiate interface in java?

924


What does @param args mean in java?

1012


Is java type safe?

915


Can a class be protected in java?

916


What access modifiers can be used for variables?

1071


Why deletion in linkedlist is fast than arraylist?

1024


What are variable arguments or varargs?

958


Explain about fail safe iterators in java?

962


What are access specifiers available in java?

968


Is string a datatype?

928


How do you break a loop?

927


os is developed in c no java is more secured then c na why dont the os developed is developed using java

4132