}
class Dog extends Animal
{
String name ="dog";
int age = 6;
Dog()
{
super();
}
Dog(int age)
{
super(age);
}
Dog(String name,int age)
{
super(name,age);
}
public void show()
{
System.out.println(this.getName()+this.getAge()+"+++++++++++++++");
}
}
public class SuperDemo {
public static void main(String[] args) {
Animal a1 = new Animal();
Animal a2 = new Animal(23);
Animal a3 = new Animal("jaja",25);
a1.show();
a2.show();
a3.show();
Dog d1 = new Dog();
Dog d2 = new Dog(1);
Dog d3 = new Dog("wangcai",5);
d1.show();
d2.show();
d3.show();
}