Here you can find the source of getNewSortedIntArray(int[] codePointArray)
private static int[] getNewSortedIntArray(int[] codePointArray)
//package com.java2s; /*/*from www. ja va 2s . com*/ * Copyright (c) 2017, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import java.util.*; public class Main { private static int[] getNewSortedIntArray(int[] codePointArray) { int[] allCodePoints; int codePointCount; if (codePointArray == null || codePointArray.length == 0) throw new IllegalArgumentException( "codePointArray is null or has zero length"); codePointCount = codePointArray.length; allCodePoints = new int[codePointCount]; System.arraycopy(codePointArray, 0, allCodePoints, 0, codePointCount); Arrays.sort(allCodePoints); return allCodePoints; } }