How TreeMap sorts the objects inside it?? suppose if have
include one employee object and one car object. On what
basis it will sort?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / naveen.bav
Hello Venkatesh, I am not asking for synchronization. I am
asking how TreeMap will sort the values inside it.Thanks
for the reply
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / malligontla
Tree Map working according to the Ascending order.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / venkatesh
call static method from Collections class
below is method:
static Map synchroizedMap(MaP Object)
Is This Answer Correct ? | 2 Yes | 9 No |
What are different types of expressions?
If you are given the name of the function at run time how will you invoke the function?
What is means by DLL file means ? What is the use of DLL file? What are the contents of DLL file?
How do you invoke a method?
When will you define a method as static?
What are constants and how to create constants in java?
explain about method overloading and method overriding with difficult examples
Why Java is called as purely platform independent..? Explain briefly..dont Give regular answers Explain with your own example..?
JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isThreadSafe="false". Explain it? Thanks, Seenu
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
Why does java have two ways to create child threads? Which way is better?
I need some details about an employee. i have only the employee id in my presentation layer(JSP).I entered that ID and click "Show Details" Button. Question is how the JSP pass that id to Controller layer and DAO and what mechanism we are using to retrive data from DB and how the data passed to JSP as a Output. Please explain in detail.