Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Arrays;

public class Main {
    public static int[][] deepCopy(int[][] arg) {
        int[][] copy = null;
        if (arg != null) {
            copy = new int[arg.length][];
            for (int rowIndex = arg.length - 1; rowIndex >= 0; rowIndex--)
                copy[rowIndex] = Arrays.copyOf(arg[rowIndex], arg[rowIndex].length);
        }
        return copy;
    }
}