View RSS Feed

Algorithm and Data Structure

Algorithm and data structure examples in Java.

  1. Java's SortedMap Interface

    by , 02-19-2012 at 08:38 AM
    The java.util.Map interfaceís subtype is the java.util.SortedMap. Functionality of java.util.Map is extended by this interface and elements are sorted which have been stored in the Map, internally.

    Elementís sorting orders are as following:

    • If java.lang.Comparable is implemented then it means that there exist elementís natural sorting order.
    • Comparator determines the order which you will be providing to the SortedSet.

    Default sorting orders are ascending ...