1.

What are abstract methods?

Answer»

Abstract methods are methods with no body specification. Subclasses must provide the method statements for their particular meaning. If the method was one provided by the superclass, it would require overriding in each subclass. And if one forgot to override, the applied method statements, may be inappropriate. The abstract keyword is also used to declare a method as abstract. An abstract method consists of a method signature, but no method body.



Discussion

No Comment Found

Related InterviewSolutions