class Base
{
public int a;
void printa()
{
System.out.println(a);
}
}
class Derive extends Base
{
public int a;
Derive(int a)
{
this.a=a;
super.a=a-1;
}
void printa()
{
System.out.println(a);
super.printa();
}
}
public class Test
{
public static void main(String[] args)
{
Derive objD=new Derive(3);
System.out.println("objD.a="+objD.a);
objD.printa();
Base objB=new Derive(6);
System.out.println("objB.a="+objB.a);
objB.printa();
}
}
/*
objD.a=3
3
2
objB.a=5
6
5
*/