Search code examples
javaabstract-classabstractabstract-methods

Why can abstract methods only be declared in abstract classes?


I understand that in abstract classes methods be both abstract, or not. But why can I not create an abstract method in a "normal", non-abstract class?

Thanks in advance for any explanation!


Solution

  • Abstract method basically says, that there is no implementation of the method and it needs to be implemented in a subclass. However if you had an abstract method in a non-abstract class, you could instantiate the class and get an object, that would have an unimplemented method, which you would be unable to call.