Which class cannot be subclass (or extended) in java?
- abstract class
- parent class
- Final class
- None of above
Answer: Option C
AbstractSubclass is an example of a subclass which is abstract
MiddleClass is an example of a “parent class” (by which it means superclass, I assume) which is also a subclass
FinalSubclass is an example of a subclass which is final
Superclass isn’t really needed here, as any class other than
java.lang.Object is a subclass – either of
java.lang.Object or of some (potentially indirect) subclass of
Which Class cannot be subclass in Java, Class in Java, Java Important Questions , Objective type Java Questions and Answers.