class Employee {
public String toString() {
reuturn getClass().getName()
+ "[name=" + name
+ ",salary" + salary
+ ",hireDay" + hireDay +"]";
}
}
class Manager extends Employee {
public String toString() {
return super.toString()
+ "[bouns=" + bouns
+ "]";
}
}
*问题: *现在,如何打印 Manager[name=...,salary=...,hireDay=...,][bouns=...] ?