Which class cannot be subclass (or extended) in java?
- abstract class
- parent class
- Final class
- None of above
Answer: Option C
AbstractSubclassis an example of a subclass which is abstractMiddleClassis an example of a “parent class” (by which it means superclass, I assume) which is also a subclassFinalSubclassis 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.