Posted on 2007-10-14
Last Modified: 2013-11-23

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.
Question by:zizi21
    LVL 1

    Accepted Solution

    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:

    Have a nice day

    Author Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    maxMirror challenge 10 70
    method argument as final 1 54
    Eclipse Neon and jdk 1.8.0 11 41
    Unable to start eclipse ? 17 50
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now