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?

Answers were Sorted based on User's Feedback



How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car ..

Answer / anuj

then u have to tell the trremap that on what basis elment
shoyuld be sorted all elemtns of trremap should be of type
comparable & in side comparable compare to u need to put
uor sorting logic.

Is This Answer Correct ?    5 Yes 1 No

How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car ..

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

How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car ..

Answer / naveen.bav

Hello Venkatesh, I am not asking for synchronization. I am
asking how TreeMap will sort the values inside it.Thanks
for the reply

Is This Answer Correct ?    0 Yes 0 No

How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car ..

Answer / malligontla

Tree Map working according to the Ascending order.

Is This Answer Correct ?    1 Yes 1 No

How TreeMap sorts the objects inside it?? suppose if have include one employee object and one car ..

Answer / venkatesh

call static method from Collections class
below is method:
static Map synchroizedMap(MaP Object)

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Core Java Interview Questions

Does list maintain insertion order java?

0 Answers  


Can we make main() thread as daemon?

0 Answers  


Can I learn java in 3 months?

0 Answers  


What is abstraction in java?

0 Answers   Akamai Technologies,


What is the exact difference in between Unicast and Multicast object ?

4 Answers   Accenture,


Why java is secure? Explain.

0 Answers  


What is gui programming?

0 Answers  


Why does java does not support multiple inheritance? Explain

0 Answers  


What are sets in java?

0 Answers  


What are the differences between the constructors and methods?

0 Answers  


I have a string like _a01_a02_a03_ and another string like _2_1.5_4_ as input.I want to extract a01,a02... to a string array and 2,1.5,etc to a double array with a01 corresponds to 2 and a02 to 1.5 etc. Need code in core java.. Can you do it?

1 Answers   Cognizant,


How do you clear a method in java?

0 Answers  


Categories