The Startup
Published in

The Startup

From Java 8 to Java 15 in Ten Minutes

A path with many great news: from Java 8 to Java 15

Functional Programming (Java 8)

Streams (Java 8)

Optional (Java 8)

JShell (Java 9)

Factory Methods for Immutable Collections (Java 9)

Type Inference with var (Java 10)

Single Source File Launch (Java 11)

Switch Expression (Java 12)

  • Instead of double points, we use arrows ->
  • There’s no need for break
  • The default case can be omitted when all possible cases are considered
  • To enable this feature with Java 12, use --enable-preview --source 12

Multi-line Strings (Java 13)

Data Classes: record (Java 14)

instanceof without Cast (Java 14)

Sealed classes (Java 15)

Bonus: Updated Licensing Terms Starting with Java 8

  • Use a newer Oracle JDK version (Oracle offers free security updates for only 6 months after each release)
  • Use and old JDK version at your own risk
  • Use an old OpenJDK Java version, those still get security updates from the open source community or a third party vendor
  • Pay Oracle for premier support (e.g. Java 8: support until 2030)
Oracle support timeline per JDK

Wrap up



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Philipp Gysel

I love finance and computer science. I’m interested in long-term investing and Java/SpringBoot applications.