Bus bus = new Bus(); bus.name = "汽车"; bus.people = 33; bus.size = 8; System.out.println("大小为"+bus.size+"的"+bus.name+bus.run()+bus.people+"人");run()是继承父类的,没毛病,运行后的报错是这样的:The operator + is undefined for the argument type(s) String, void看不太懂。
添加回答
举报
0/150
提交
取消