Abstract Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Can an abstract class be instantiated?

A

No.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 5 rules for an abstract class?

A
  1. It must be declared using the keyword “abstract”.
  2. It can contain abstract and non-abstract methods.
  3. It cannot be instantiated.
  4. It can have constructors and static methods.
  5. It can also have final methods.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Abstract methods can only be declared in _________.

A

Abstract classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly