public class Copy
{
public static void main(String args[])
{
int x[][] = {{1, 2, 3},{4, 5, 6},{7, 8, 9}};
int y[][] = {{9, 6, 5},{2, 3, 5},{4, 7, 8}};
System.arraycopy(y, 0, x, 0, x.length);
for(int i = 0; i < x.length; i++)
{
for (int j = 0; j < x[i].length; j++)
System.out.print(x[i][j]);
System.out.println();
}
}
}
应该是这样的 |