-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3e02fc
commit 08488d6
Showing
1 changed file
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
## Sealed class | ||
Subclasses of a sealed class must be modified by one of the following: | ||
|
||
- final: No further subclasses are allowed. | ||
![final]() | ||
- sealed: A sealed set of subclasses is allowed. | ||
- non-sealed: This is a new keyword that allows inheritance by unknown subclasses. | ||
![non-sealed]() | ||
A sealed class MUST permit at least one subclass | ||
 | ||
|
||
A subclasses must be either final, non-sealed or sealed | ||
 | ||
|
||
- a subclass as non-sealed | ||
 | ||
- a subclass as final | ||
 | ||
- a subclass as sealed must have subclasses | ||
 | ||
- if subclass is non-sealed | ||
 | ||
- if subclass is final | ||
 | ||
|
||
|
||
|
||
|
||
|