Here you can find the source of intArray2IntegerArray(int[] array, int newLength)
public static Integer[] intArray2IntegerArray(int[] array, int newLength)
//package com.java2s; //License from project: Apache License public class Main { public static Integer[] intArray2IntegerArray(int[] array, int newLength) { Integer[] ret = new Integer[newLength]; for (int i = 0; i < ret.length; i++) { ret[i] = array[i];//from w w w. j a v a 2s. c o m } return ret; } }