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
What is the difference between delete and delete[]
Explain the difference between serializable and externalizable in java?
How does split work in java?
Explain purpose of sleep() method in java?
Is zero a positive integer?
Is vector thread safe in java?
What is consumer in java?
What are unchecked exceptions in java?
Is minecraft 1.15 out?
What are abstract methods in java?
What is early binding and late binding in java?
Explain importance of throws keyword in java?
How do I stop concurrentmodificationexception?
What does .equals do in java?
Explain, java is compatible with all servers but not all browsers?