Here you can find the source of ArrayToArray(Integer obj, Integer[] objArray)
public static Object[][] ArrayToArray(Integer obj, Integer[] objArray)
//package com.java2s; //License from project: Apache License public class Main { public static Object[][] ArrayToArray(Integer obj, Integer[] objArray) { Object[][] objs = new Object[objArray.length][2]; for (int i = 0; i < objArray.length; i++) { objs[i] = new Object[] { obj, objArray[i] }; }//from www .jav a 2 s. c o m return objs; } public static Object[][] ArrayToArray(String ids, Integer[] objArray) { String[] idArray = ids.split(","); Object[][] objs = new Object[objArray.length * idArray.length][2]; int z = 0; for (int j = 0; j < idArray.length; j++) { for (int i = 0; i < objArray.length; i++) { objs[z++] = new Object[] { idArray[j], objArray[i] }; } } return objs; } }