public class child extends parent{
public abstract void display(){
System.out.println("parent");
}
..
You should remove the
abstract modifier from the child class' display() method...
To further elaborate, the error occured because the compiler may have interpreted the code as either creating a plain abstract method or implementing an abstract method.
If the child's method display() is marked abstract it should have no body and the child class should be marked abstract too. If that is the case the next concrete subclass of child (class that's not marked abstract) have to implement all the abstract methods up the inheritance tree.
Should you choose just to provide the abstract method implementation of the class parent's display() method, then just removing the abstract modifier will be enough.
Hope this helps.
[ August 15, 2008: Message edited by: Denise Saulon ]