DEVFYI - Developer Resource - FYI

What is the benefit of subclass?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

127. What is the benefit of subclass?

Generally: The sub class inherits all the public methods and the implementation.
The sub class inherits all the protected methods and their implementation.
The sub class inherits all the default(non-access modifier) methods and their implementation.
The sub class also inherits all the public, protected and default member variables from the super class.
The constructors are not part of this inheritance model.

(Continued on next question...)

Other Interview Questions