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

Why should we use singleton pattern instead of static class?

932


Is java based on c?

997


What is polymorphism in java? What are the kinds of polymorphism?

1076


What is a container in a gui?

995


Can java inner class be static?

1028


what is the difference between yielding and sleeping? : Java thread

970


Is java a software?

959


Can list be final in java?

934


What is the difference between sop and work instruction?

927


Explain the difference between runnable and callable interface in java?

1056


Difference between final and effectively final ?

1109


What is the use of private static?

1052


What is visibility mode?

969


What is abstract class constructor called?

1004


Can we define a package statement after the import statement in java?

1069