java语言
class dog{ public String name; public int age; public void eat(){ System.out.println("有吃东西的能力"); } } class xiaoming extends dog{ } public class Animal { public static void main(String[] args) { // TODO Auto-generated method stub dog b=new dog(); b.age=10; b.eat(); } } 对于以上代码,如果我想我age也打印输出那应该如何修改代码?