About Question enthuware.ocpjp.v21.2.3689 :
Posted: Fri Apr 04, 2025 12:55 am
The question here states "Identify correct statements.".
The option "Class B will compile if, instead of final, it is made non-sealed." is considered wrong, with the explanation:
"A permitted subclass of a sealed class must be final, non-sealed, or sealed. So, final is fine for class B."
While final is perfectly fine, so is "non sealed", which makes "Class B will compile if, instead of final, it is made non-sealed." true.
The option "Class B will compile if, instead of final, it is made non-sealed." is considered wrong, with the explanation:
"A permitted subclass of a sealed class must be final, non-sealed, or sealed. So, final is fine for class B."
While final is perfectly fine, so is "non sealed", which makes "Class B will compile if, instead of final, it is made non-sealed." true.