Here you can find the source of sort(T[] array)
public static <T> T[] sort(T[] array)
//package com.java2s; //License from project: Apache License import java.util.Arrays; import java.util.Comparator; public class Main { public static <T> T[] sort(T[] array) { Arrays.sort(array);/* w w w . jav a 2s . c o m*/ return array; } public static <T> T[] sort(T[] array, Comparator<T> comparator) { Arrays.sort(array, comparator); return array; } public static double[] sort(double[] array) { Arrays.sort(array); return array; } public static int[] sort(int[] array) { Arrays.sort(array); return array; } public static long[] sort(long[] array) { Arrays.sort(array); return array; } }