Here you can find the source of toObjectArray(int[] array)
public static Integer[] toObjectArray(int[] array)
//package com.java2s; /*L/* w w w . j av a2 s . c o m*/ * Copyright Oracle Inc, SAIC-F. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cadsr-bulk-loader/LICENSE.txt for details. */ public class Main { public static Integer[] toObjectArray(int[] array) { if (array == null) { return null; } Integer[] data = new Integer[array.length]; for (int i = 0; i < array.length; i++) { data[i] = new Integer(array[i]); } return data; } public static Double[] toObjectArray(double[] array) { if (array == null) { return null; } Double[] data = new Double[array.length]; for (int i = 0; i < array.length; i++) { data[i] = new Double(array[i]); } return data; } }