Sample code to retrieve objects from HashMap in sorted
ascending order?
Answer Posted / murli
Map hm = new HashMap();
//add values to hashmap
Map tm = new TreeMap(hm);
//Iterate keySet in tm
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
How list contains works in java?
Why do we use variables?
What do you mean by access modifier?
Is this valid in java ? Can we instantiate interface in java?
What does @param args mean in java?
Is java type safe?
Can a class be protected in java?
What access modifiers can be used for variables?
Why deletion in linkedlist is fast than arraylist?
What are variable arguments or varargs?
Explain about fail safe iterators in java?
What are access specifiers available in java?
Is string a datatype?
How do you break a loop?
os is developed in c no java is more secured then c na why dont the os developed is developed using java