Skip to content
Sharp

Language Upgrades · interview question

Which of the following is NOT a valid way to define a class that extends a sealed class?

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

Correct answer

D. As an abstract class

Why

While a subclass extending a sealed class can be defined as final, sealed, or non-sealed, defining it as an abstract class is not directly related to the sealed class hierarchy rules. Abstract classes are about incomplete implementations, not about sealed hierarchy control.

Test yourself on Language Upgrades

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

Start free test
All Language Upgrades questions →