Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.*;

public class Main {
    public static <X extends Comparable<X>> Comparator<X> naturalOrder() {
        return new Comparator<X>() {
            public int compare(X a, X b) {
                return a.compareTo(b);
            }
        };
    }
}