seniorKotlin

What is Kotlin's sealed interface and how is it different from sealed class?

Updated May 16, 2026

Short answer

Sealed interfaces allow multiple inheritance-like modeling compared to sealed classes.

Deep explanation

Sealed interfaces (introduced in Kotlin 1.5+) allow multiple implementations while maintaining restricted hierarchies. Unlike sealed classes, which enforce single inheritance, sealed interfaces support more flexible modeling especially for domain modeling.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More Kotlin interview questions

View all →