shape st[][]=new shape[3][2]; shape st[0][0]=new circle(2); shape st[0][1]=new circle(4);为什么不对?

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 00:11:07
shape st[][]=new shape[3][2]; shape st[0][0]=new circle(2); shape st[0][1]=new circle(4);为什么不对?
x)+H,HU(.K-W DFZ+e b,Ya*k"kidǮ'x6IE l:v6ⳮkݰҽOv<hsV7<_EOozYOvv>߸n.<;͎ȭ

shape st[][]=new shape[3][2]; shape st[0][0]=new circle(2); shape st[0][1]=new circle(4);为什么不对?
shape st[][]=new shape[3][2]; shape st[0][0]=new circle(2); shape st[0][1]=new circle(4);
为什么不对?

shape st[][]=new shape[3][2]; shape st[0][0]=new circle(2); shape st[0][1]=new circle(4);为什么不对?
把第二个和第三个shape去掉就好了,因为st[0][0]在第一句里面已经定义类型了