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

What is a constructor, constructor overloading in java?

1044


What does int [] mean in java?

1093


Is ++ operator is thread safe in java?

1003


What are streams in java 8?

1045


What is callable java?

1034


How can we pass argument to a function by reference instead of pass by value?

1156


Which sorting algorithm is in place?

1017


Discuss 2D arrays.

1101


What is an empty string in css?

1098


what is instanceof operator used in java?

1080


Can you explain the private protected field modifier?

1074


Can we override constructors?

1050


What are the main differences between the java platform and other platforms?

1104


Why string is not thread safe?

1046


What is a parameter used for?

1005