-
Notifications
You must be signed in to change notification settings - Fork 22
Sealed Class
Devrath edited this page Mar 8, 2024
·
13 revisions
-
Sealed classes
are a collection ofinstances
while theenum
is the collection ofvalues
. - Usage of
when
expression withenum
. - Limiting the hierarchy of classes.
- Can create multiple instances of sub-types.
- sealed class is abstract by default