为什么运行结果是这样:chapter3.Dog@1db9742
package abc;
public class Dog extends Animal {
@Override
public String toString() {
return "Dog [age=" + age + "]";
}
public int age=20;
public void eat() {
System.out.println("狗具有吃骨头的能力");
}
public Dog() {
System.out.println("Dog执行了");
}
public void nb() {
eat();
}
}