-
-
-
}
}
public class test1 extends test
{
public void say()
{
super.hello();
hello();
}
public void main(String arg[])
{
test1 t = new test1();
t.say();
}
}
In the above code what will be difference of super.hello(); and hello();. What is use of super instead of calling directly method name.
">public class test{ public void hello() { System.out.println("Helllo"); }}public class test1 extends test{ public void say(){ super.hello(); hello();}public void main(String arg[]){ test1 t = new test1(); t.say();}}In the above code what will be difference of super.hello(); and hello();. What is use of super instead of calling directly method name.