Can any one say how will sort map objects in java?

Answers were Sorted based on User's Feedback



Can any one say how will sort map objects in java?..

Answer / srikanth

using tree map ie it will sort by key

Is This Answer Correct ?    20 Yes 0 No

Can any one say how will sort map objects in java?..

Answer / guest

In map we have TreeMap ,which sort objects as natural
order.and don't allow duplicate keys and null values

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More Core Java Interview Questions

How would you use Bubble Sort to sort the number of elements?

0 Answers   Genpact,


why Interface used?

0 Answers   HCL,


What is a file pointer?

0 Answers  


What does \ mean in regex?

0 Answers  


whatis Home interface and Remoteinterface? with example?

0 Answers   Saksoft,






What is dynamic binding(late binding)?

0 Answers  


Is void a type?

0 Answers  


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

0 Answers   Amazon,


how to compile jsp?

4 Answers   Logica CMG,


why to use transient variables when static variables can be used for Serialization

4 Answers  


Write a java program to count the number of words present in a string?

0 Answers  


What is the use of set in java?

0 Answers  


Categories