How to sort the elements in HashMap

Answer Posted / srinivasa

By implementing comparable interface we can sort the
HashMap

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you are given the name of the function at run time how will you invoke the function?

678


How can you read content from file in java?

597


How do you identify if jvm is 32-bit or 64-bit from java program?

536


How do you use compareto in java?

553


Why is singleton not thread safe?

645






Can we have any other return type than void for main method?

536


What is the difference between int and integer in java?

509


Explain what do you mean by functional overloading in java?

553


How many bytes is a unicode character?

502


what methods would you overwrite in java.lang.object class?

560


What is the symbol for average?

513


How to sort an unsorted array in java?

608


What is meant by class loader? How many types are there?

668


What is the similarity between dynamic binding and linking?

603


Can a hashset contain duplicates java?

492