Skip to content

Add Chapter: Sealed Classes (Java 17+) #222

@e-reznik

Description

@e-reznik

I would like to propose adding a new chapter on Sealed Classes (introduced in Java 17) to the book.

Sealed classes are an important modern language feature that allow developers to explicitly control class hierarchies. Since this book already covers classes and object-oriented structure, sealed classes would be a good extension of that topic.

I suggest placing the chapter in:

Code Structure II
26. Classes
27. --> Sealed Classes
28. Instance Methods

An example outline for that chapter could be:

  1. Motivation
  2. Basic Syntax
  3. The permits clause
  4. final vs. sealed vs. non-sealed
  5. Sealed interfaces

If this proposal sounds reasonable, I would be happy to draft the chapter content, following the existing style and structure of the book.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions