What are abstract classes and abstract methods? [duplicate]

Abstract class is one which can’t be instantiated, i.e. its object cannot be created.

Abstract method are method’s declaration without its definition.

A Non-abstract class can only have Non-abstract methods.

An Abstract class can have both the Non-abstract as well as Abstract methods.

– If the Class has an Abstract method then the class must also be Abstract.

An Abstract method must be implemented by the very first Non-Abstract sub-class.

Abstract class in Design patterns are used to encapsulate the behaviors that keeps changing.

Leave a Comment

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