DEVFYI - Developer Resource - FYI

What is an abstract class?

Java Interview Questions and Answers (part 3)

(Continued from previous question...)

473. What is an abstract class?

Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie, you may not call its constructor), abstract class may contain static data. Any class with an abstract method is automatically abstract itself, and must be declared as such.
A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.

(Continued on next question...)

Other Interview Questions