In Kotlin, abstract class is declared using the abstract keyword in front of class. An abstract class can not instantiated means we can not create object for the abstract class.
- We can’t create an object for abstract class.
- All the variables (properties) and member functions of an abstract class are by default non-abstract. So, if we want to override these members in the child class then we need to use open keyword.
- If we declare a member function as abstract then we does not need to annotatate with open keyword because these are open by default.
- An abstract member function doesn’t have a body, and it must be implemented in the derived class.
- An abstract class can contain both abstract and non-abstract members.