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 do you start a new line in java?
What is a function easy definition?
What is string [] args?
What is charat java?
What is initial size of arraylist in java?
Is java 1.7 the same as java 7?
Give me an example of array and linked list? Where they can be used?
What is variable and its types?
How big is a 32 bit integer?
What is Java Reflection API? Why it’s so important to have?
What is ternary operator?
What are design patterns and please explain?
What is constructor and its types?
What are thread safe functions?
Differentiate between stringbuffer and stringbuilder in java.