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

Is string pool garbage collected?

1004


What does singleton mean in java?

995


What is array and arraylist in java?

1104


What is a literal coding?

1019


What is the difference between abstract classes and interfaces?

1015


Implementations of set interface?

1006


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

1082


Explain the inheritance?

966


What happens if we don’t override run method ?

1001


How will you load a specific locale?

970


What does business logic mean?

989


What does string mean in java?

1100


How do I write a self declaration?

1107


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

1027


How do you clear an arraylist in java?

985