public static void main(String[] args) {
int[][] srcArr={{1,2,3,4},{5,6,7,8},{9,10,11,12}};//3行4列
int xLen=srcArr.length, yLen=srcArr[1].length;
int[][] destArr=new int[xLen][yLen];
for(int x=0;x<xLen;x++){
//使用System.arraycopy(Object src,int srcPos,Object dest,int //destPos,int length)
System.arraycopy(srcArr[x], 0, destArr[x], 0, yLen);
}
}
int[][] srcArr={{1,2,3,4},{5,6,7,8},{9,10,11,12}};//3行4列
int xLen=srcArr.length, yLen=srcArr[1].length;
int[][] destArr=new int[xLen][yLen];
for(int x=0;x<xLen;x++){
//使用System.arraycopy(Object src,int srcPos,Object dest,int //destPos,int length)
System.arraycopy(srcArr[x], 0, destArr[x], 0, yLen);
}
}