代码没有报错,但班级就是输出null
this.banji = banji;
构造函数里加一条语句,在this.age=age后面加入如下语句:
this.age = age;后面加上this.banji = banji;
有用望采纳
构造方法里没有对班级赋值