Android examples for java.lang:array copy
clone two dimensinal Array
public class Main{ public static int[][] cloneArray(int[][] src) { int[][] dst = new int[src.length][]; for (int i = 0; i < src.length; i++) { int[] aMatrix = src[i]; int aLength = aMatrix.length; dst[i] = new int[aLength]; System.arraycopy(aMatrix, 0, dst[i], 0, aLength); }/*from w w w. ja v a2 s. com*/ return dst; } }