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

What are the benefits of immutable objects?

775


Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.

2506


What are the 4 types of characters?

793


Why do we need wrapper classes?

836


Why is core java important?

817


What is thread pool in java with example?

758


Why is an interface be able to extend more than one interface but a class can’t extend more than one class?

962


How is the marker interface used in Java?

839


What does split function do in java?

775


Why is it called a string?

780


Are strings immutable in java?

761


Why we use multi threading instead of multiprocessing?

810


Describe the process as to how substring() methodology mechanisms in java.

812


Is void a keyword in java?

806


Is java 11 paid version?

746