Package net.jrodolfo.java_evolution.java10
package net.jrodolfo.java_evolution.java10
Examples for features introduced in Java 10.
Java 10 was a smaller release focused on local variable type inference with
var, unmodifiable collectors, and the no-argument
Optional.orElseThrow() convenience method.
The examples in this package intentionally stay focused on Java 10 additions, even though the whole project is compiled with a newer JDK.
For beginner-oriented notes about the problems these features solved, see the package README in the source directory.
-
ClassesClassDescriptionDemonstrates local variable type inference, introduced in Java 10 through the
varreserved type name.Demonstrates the no-argumentOptional.orElseThrow()method added in Java 10.Demonstrates unmodifiable collectors introduced in Java 10.Small Java 10-style data class used by the collector examples.