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 / 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 |
Post New Answer View All Answers
Write a program to solve producer consumer problem in java?
Explain about static nested classes in java?
What is the use of conditional statement?
What is a file pointer?
Can we sort hashmap in java?
Can we override constructors?
what is the difference between the methods sleep() and wait()? : Java thread
How do you define a parameter?
What is class??
Explain some best practices you would apply while using collection in java?
What is a jagged array in java?
Can we override protected method in java?
What is garbage collection? Can it be forced to run?
What is difference between path and classpath in java?
What are three advantages of using functions?