Skip to content
Sharp

Language Upgrades · interview question

What is required for a class to implement a sealed interface?

Multiple choiceEasychapter-12-curatedpremiumlanguage-upgradessealed-classes
Choose one answer
Answer and explanation

Correct answer

C. It must be listed in the permits clause of the interface.

Why

For a class to implement a sealed interface, it must be listed in the permits clause of the interface, ensuring only authorized implementations can be created, similar to extending a sealed class.

Test yourself on Language Upgrades

A free test with instant, explained results. No account needed.

Start free test
All Language Upgrades questions →