class Animal ...{ int age = 10; public void move()...{ System.out.println("move"); }}class Human extends Animal...{ public static void main(String[] args) ...{ Human h = new Human(); h.move(); System.out.println(h.age); }} Human继承了Animal,因此在测试代码中可以打印Human的实例对象h的age属性,及调用h.move();