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
What are the differences between graph and tree?
Can we convert stringbuffer to string?
What do you mean by buffering?
What are memory tables?
what are Hostile Applets?
What is a function easy definition?
What is difference between word and integer?
Why is static used?
Can a lock be acquired on a class in java programming?
Why do we use return statement?
What is a generic code?
Can we serialize static variables in java?
Can an abstract class be a final class?
What is the difference between object oriented programming language and object based programming language?
What are the legal operands of the instanceof operator?