Unsorted Flashcards
1
Q
What is an abstract class?
A
Can be used for inheritance, but cannot be instantiated. I.e. You can have cats, dogs, elephants, each of which is an animal, but you cannot simply have an animal.
Making animal an abstract class means you cannot simply create an ‘animal’, it has to be a type of animal.