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

How TreeMap sorts the objects inside it?? suppose if have
include one employee object and one car object. On what
basis it will sort?

Answer Posted / shaik baji

The TreeMap sorts the objects in assending order by
depending on the key value.

The Key value must be "String" type so internally it will
sort the keys by using "compareTo" method.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is public/private protected in java?

1081


What is difference between pointer and reference?

1115


What is length in java?

1055


Can we convert stringbuilder to string in java?

1028


Can we overload the methods by making them static?

1045


What is your platform?s default character encoding and how to know this?

2413


What is the purpose of the finalize() method?

1297


What is set string?

1289


Explain different ways of creating a thread. Which one would you prefer and why?

1101


How do you do descending order in java?

1008


Should you use singleton pattern?

988


What is static import in java?

1029


Can we use both this () and super () in a constructor?

1047


Difference between == and .equals() ?

1036


What is files manifesting?

2253