//TestIntArraySort.java
//Illustrates sorting an array of values according to
//the "natural order" of those values. This example is
//here to remind you that when you start looking at the
//other files in this directory the first thing you need
//to note and remember is that Employee objects, unlike
//integer values, do not have any "natural order".

import java.util.Arrays;

public class TestIntArraySort
{
    public static void main(String[] args)
    {
        System.out.println();
        int[] intArray =
        {
            7, 2, 9, 5, 3, 1
        };
        for (int i : intArray)
        {
            System.out.print(i + " ");
        }
        System.out.println();

        Arrays.sort(intArray);
        for (int i : intArray)
        {
            System.out.print(i + " ");
        }
        System.out.println();
    }
}
/*  Output:

    7 2 9 5 3 1
    1 2 3 5 7 9
*/
