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 is mysql driver class name?
Which method cannot be overridden in java?
How is it possible in java programming for two string objects with identical values not to be equal under the == operator?
What is field name?
Can we override private methods?
What is null statement?
What are methods of a class?
What is difference between pointer and reference?
What is the use of parseint in java?
What is the largest long allowed by java?
What do you mean by hashing?
What is ordered map in java?
What does java final mean?
Explain the usage of this with constructors?
What are the steps involved to write rmi based programs?