Payment model, permits and the three modifiers, default-branch trap, generic and recursive hierarchies, visitor comparison, run-time enforcement, modules. Transcripts from JDK 21, 25 and 27. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
4 lines
135 B
Java
4 lines
135 B
Java
public class NoSubclass {
|
|
sealed interface Payment {} // no permits clause and no subtype in this file
|
|
}
|