"To use an abstract class, you have to inherit it from another class" I donot understand the meaning of this sentence | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

"To use an abstract class, you have to inherit it from another class" I donot understand the meaning of this sentence

please explain

25th Jun 2018, 10:35 AM
Tom
Tom - avatar
2 Answers
+ 3
abstract class is designed to be inherited by subclasses that either implement or override it's methods. abstract class cannot be instantiated .the purpose. of this class is to provide a common definition of a base class. for example: student and teacher class inherit from person class , so person class can define as abstract class.
25th Jun 2018, 10:42 AM
Reza Basereh
Reza Basereh - avatar
+ 3
In my opinion, you can consider an abstract class as a prototype for a concrete class
25th Jun 2018, 1:45 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar