The error is that the Fruit superclass does not have a no-arg constructor, but the Apple subclass constructor does not explicitly call a superclass constructor. When a subclass does not explicitly call a superclass constructor, the compiler automatically inserts a no-arg super() call. But since Fruit does not have a no-arg constructor, this causes a compile-time error.
To fix it, the Apple constructor needs to explicitly call the Fruit constructor:
public Apple(String name) {
super(name);
System.out.println("Apple constructor is invoked");
}