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 abstractMiddleClass
is an example of a “parent class” (by which it means superclass, I assume) which is also a subclassFinalSubclass
is an example of a subclass which is final
Even 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 java.lang.Object
.
Which Class cannot be subclass in Java, Class in Java, Java Important Questions , Objective type Java Questions and Answers.