Your super method is abstract so when you inherit the that class you have to give a body to the abstract method or call that class also abstract. When you call the isValid method be the reference be of the super class or base class it will call the base class method as your super class method is abstract. You can't not create an object of an abstract class.