Java examples for Collection Framework:Array Copy
deep Copy two dimensional array
//package com.java2s; public class Main { public static int[][] deepCopy(int[][] array) { int[][] clone = new int[array.length][]; for (int i = 0; i < clone.length; i++) { clone[i] = array[i].clone(); }//from w ww .j a v a 2 s .co m return clone; } public static double[][] deepCopy(double[][] array) { double[][] clone = new double[array.length][]; for (int i = 0; i < clone.length; i++) { clone[i] = array[i].clone(); } return clone; } }