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

来源:学生作业帮助网 编辑:作业帮 时间:2024/03/29 05:35:03
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[][]=new shape[3][2]; shape st[0][0]=new circle(2); shape st[0][1]=new circle(4);为什么不对?
把第二个和第三个shape去掉就好了,因为st[0][0]在第一句里面已经定义类型了