Consider the statements with respect to the classes mentioned in the permit classes and choose the correct option?

a) Permitted subclasses must be accessible by the sealed class at compile time.
b) Permitted subclasses  must directly extend the sealed class.
c) Permitted subclasses  must be in the same module as the sealed class (if the sealed class is in a named module) or in the same package (if the sealed class is in the unnamed module)
d) Permitted subclasses  must have exactly one of the following modifiers( final, sealed, nonsealed) to describe how it continues the sealing initiated by its superclass
 

Only options a, b, d are correct

Only options b, c, d are correct

Only options a, c, d are correct

All options are correct

Verified Answer
Correct Option - d

To get all Infosys Certified Java SE 21 Developer Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in