Here you can find the source of arraysConvert(String[] src, int column)
public static String[][] arraysConvert(String[] src, int column)
//package com.java2s; //License from project: Apache License public class Main { public static String[][] arraysConvert(String[] src, int column) { int row = src.length / column; String[][] tmp = new String[row][src.length / row]; for (int i = 0; i < row; i++) { tmp[i] = new String[column]; System.arraycopy(src, i * column, tmp[i], 0, column); }//from w ww. j a va2 s .c o m return tmp; } }