Here you can find the source of appendArray(int[][] array, int[] staple)
public static int[][] appendArray(int[][] array, int[] staple)
//package com.java2s; public class Main { public static int[][] appendArray(int[][] array, int[] staple) { int[][] output = new int[array.length + 1][]; System.arraycopy(array, 0, output, 0, array.length); output[array.length] = staple;// ww w. j a v a 2 s. c o m return output; } }