public class clone {
static int[][] cloneArray(int source[][]) {
int[][] x = new int[source.length][source[0].length];
for (int i = 0; i < source.length; i++) {
for (int j = 0; j < source[i].length; j++) {
x[i][j] = source[i][j];
}
}
return x;
}
public static void main(String args[]) {
int source[][] = {{1, 2, 3}, {3, 4, 5}, {5, 6, 7}};
int receiver[][];
receiver = cloneArray(source);
for (int i = 0; i < receiver.length; i++) {
for (int j = 0; j < receiver[i].length; j++) {
System.out.println(receiver[i][j]);
}
}
}
}