I have googled couple of times but still can\'t understand the supertype method. Can anyone please explain what is this?
Super is used to invoke parent class Properties used at 3 levels variable constructer and method level
1.Super at Variable
class Super
{
int age;
Super(int age)
{
this.age=age;
}
public void getAge()
{
System.out.println(age);
}
}
class Sub extends Super
{
Sub(int age)
{
super(age);
}
public static void main(String[] args)
{
Super obj=new Super(24);
obj.getAge();
}
}