Defining an abstract class without any abstract methods

Of course.

Declaring a class abstract only means that you don’t allow it to be instantiated on its own.

Declaring a method abstract means that subclasses have to provide an implementation for that method.

The two are separate concepts, though obviously you can’t have an abstract method in a non-abstract class. You can even have abstract classes with final methods but never the other way around.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)