Sealing a class or interface restricts the list of subclasses or implementations to a predefined set. For example, consider defining a Shape and restricting subclasses to be only triangles and squares. public class SealedClasses { sealed class Sh...

Markdown supported · ⌘↵ to post
No responses yet.