super keyword

class base
{
int a=100;
}

public class sup1 extends base
{
int a =200;
void show()
{
//System.out.println(super.a);
System.out.println(a);
}
public static void main(String args[])
{
sup1 b=new sup1();
b.show();
}
}

Comments

Popular Posts