Martin Ahrer

Thinking outside the box

0001-01-01 1 min read
Sealed Class Permits
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/seventeen/lang/SealedClasses.java[tags=Shape;Ellipsis;Circle;Rectangle]
  1. The new keyword permits declares which subclasses are allowed.

  2. Subclasses may be sealed,

  3. final or,

  4. non-sealed

Sealed Class Subclasses In Same Sourcefile
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/seventeen/lang/SealedClasses.java[tags=Ellipsis;Circle]
  1. The permits declaration can be omitted when

  2. the subclasses are in the same source file.

Continue reading

0001-01-01 1 min read
Day Period Support
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/sixteen/api/DayPeriodSupport.java[tag=dayPeriodSupport]

0001-01-01 1 min read

The following describes selected improvements of the Java API. See the Java 16 release notes.

Unresolved directive in <stdin> - include::DayPeriodSupport.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::StreamApi.adoc[leveloffset=+1]

0001-01-01 1 min read
Stream.toList()
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/sixteen/api/StreamApi.java[tag=toList]
Older posts Newer posts