1. CSS
  2. Flash
  3. HTML
  4. Illustrator
  5. Java
  6. JavaScript
  7. Maya
  8. Photography
  9. Photoshop
  10. PHP
  11. Ruby
  12. Ruby on Rails
  13. 3ds Max

Java: Java TreeMap Tutorial: Master TreeMap with Example

  1. Clicks today:
    0
  2. Clicks this month:
    0
  3. Overall rating:
    4.00/5

Java » Basics — almost 6 years ago
TreeMap in Java is the best solution for Java programs which are looking for sorted datastrucutre. TreeMap in Java sort keys based on either their natural order or any custom order defined by provided comparator while creating TreeMap. If you try to store any element in TreeMap which is not of same type like earlier key you will get ClassCastException because with every new key insertion treeMap sort all the keys.

Comments

Your Comment

You must be logged in to post a comment.