Java examples for Data Structure:Matrix
Deep copy int Matrix
//package com.java2s; public class Main { public static int[][] deepCopyIntMatrix(int[][] input) { if (input == null) return null; int[][] result = new int[input.length][]; for (int r = 0; r < input.length; r++) { result[r] = input[r].clone(); }/*from w w w. ja va 2s . c o m*/ return result; } }