Programming Tutorials

Comment on Tutorial - Method Overriding in Java By Henry



Comment Added by : SUNIL SHAH

Comment Added at : 2012-05-25 06:17:23

Comment on Tutorial : Method Overriding in Java By Henry
you have extended class Abc within class Abc
the correct code is
class Abc
{
public void display()
{
System.out.println("hai");
}
}
class Bca extends Abc
{
public void display()
{
System.out.println("hello");
}
public static void main(String[] args)
{
Bca obj=new Bca();
obj.display();
}
}


View Tutorial