How can we reverse the order in the TreeMap ?
Javasearch.buggybread.com
Share

Search Interview Questions


 3335 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Java - Interview Questions and Answers

 Q1. How can we reverse the order in the TreeMap ?
Admin
info@buggybread.com
Ans. Using Collections.reverseOrder()

Map tree = new TreeMap(Collections.reverseOrder());

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   collections   map   treemap

Try 1 Question(s) Test


Related Questions

  Difference between TreeMap and HashMap ?
  Difference between HashMap and Hashtable?
  Can you provide some implementation of a Dictionary having large number of words ?
 Collections.sort can only be performed on ..

a. Set
b. List
c. Map
d. Any Collection implementation
  What is the difference between List, Set and Map ?

or

What are the different Java Collections Interfaces ?
  What is a ConcurrentHashMap ?
  Which of the following collections stores its elements in insertion Order ?

a. HashMap
b. TreeMap
c. LinkedHashMap
d. LinkedMap
  Which of the following doesn't extend Collection interface ?
 Why HashTable has been deprecated ?
  Can we use null as a key for a map collection ?




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this