Here you can find the source of intArrayToShortArraySorted(int[] source)
private static short[] intArrayToShortArraySorted(int[] source)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { private static short[] intArrayToShortArraySorted(int[] source) { short[] result = new short[source.length]; for (int i = 0; i < source.length; i++) { result[i] = (short) source[i]; }// w ww .ja va2s. co m Arrays.sort(result); return result; } }