Abstract Flashcards
1
Q
Can an abstract class be instantiated?
A
No.
2
Q
What are the 5 rules for an abstract class?
A
- It must be declared using the keyword “abstract”.
- It can contain abstract and non-abstract methods.
- It cannot be instantiated.
- It can have constructors and static methods.
- It can also have final methods.
3
Q
What are abstract classes?
A
A class that cannot be used to create objects but rather a general class that is used to create methods (cannot create concrete objects but can still inherit).
4
Q
Abstract methods can only be declared in _________.
A
Abstract classes.
5
Q
What is the concept of dynamic binding?
A
Dynamic binding is when you bind the creation of objects together from the superclass and use the derived classes as the newly created object. Depending on the derived class it is created from, the appropriate overridden method for that class is called.