public char[][] creatNewMatrix(char[][] c1, char[][] c2) { // 将数组c1的内容存到c2中
c2 = new char[c1.length][];
for (int i = 0; i < c1.length; i++) {
c2[i]=new char[c1[i].length];//分配內存
for (int j = 0; j < c1[i].length; j++) {
c2[i][j] = c1[i][j];
}
}
return c2;//返回去
}
public static void main(String[] args) {
Test0 t = new Test0();
t.b=t.creatNewMatrix(t.a, t.b);//因为此时的t.b是null。
t.printArray(t.b);
}