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
How big is a pointer?
What is Mutex (Mutual Exclusion Object) ?
How can we create objects if we make the constructor private ?
What is an immutable class? How to create an immutable class?
What is methodological theory?
What is string data type?
What is thread safe in java?
What is anagram number?
Is java jre still free?
Can we compare two strings in java?
What is the difference between serializable and externalizable interfaces?
What is the purpose of the runtime class in java programming?
What do you mean by default constructor in java?
What are the string methods in java?
What is the purpose of a volatile variable?