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

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/27 20:45:46

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

把第二个和第三个shape去掉就好了,因为st[0][0]在第一句里面已经定义类型了