• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

SortedMap

Hi,

I was reading  and it says that a SortedMap maintains its element in ascending order, sorted according to the elements' natural order ,

I am confused on the part that says "elements natural order ". Pls clarify.
thanks
0
zizi21
Asked:
zizi21
1 Solution
 
billy_sodotCommented:
The "natural order" refers to the Comparable interface.
It has the method "int compareTo(Object o)" that returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

For further rerading please refer to:
http://doc.java.sun.com/DocWeb/api/java.lang.Comparable

Have a nice day
0
 
zizi21Author Commented:
thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now