Confusion on Java

Current versions

Why Java 11?

Java 9

  • Java Modules (The “Jigsaw” project): These modules help especially in large projects with many Jar files where developers end up in classpath and class loading problems (aka JAR Hell).
  • JShell: Shell to run and test code in live mode.
  • Garbage Collector: New default garbage collector called “G1” which offers better performance.
  • HTTP 2.0 Client.
  • Process API: libraries to interact and get information on OS processes.

Java 10

  • Local-Variable Type Inference:
  • Docker: The JVM now knows when it is running inside a Docker Container.
  • Root certificates are also available in OpenJDK (Before OpenJDK had no certificates build in)

Java 11

  • Single file applications. When your Java application is only one file, you can now do:
  • Option to turn off the Garbage collector (for example for performance testing)
  • Support for Unicode 10
  • Support for TLS 1.3

Java Developer Kit’s

  1. Use OpenJDK (version 8 or 11)
  2. Use Amazon Correto JDK (version 8)
  3. Use SAP Machine JDK (version 11)
  4. Use Red Hat OpenJDK (version 11)
  5. Use Eclipse OpenJ9 (version 11)
  6. Use IBM JDK (version 11)
  7. Use Oracle GraalVM (CE)

Which JDK to use?

Beyond Java 11

Java 12

int numberOfLetters;

switch (fruit) {
case PEAR:
numberOfLetters = 4;
break;
case APPLE:
case GRAPE:
case MANGO:
numberOfLetters = 5;
break;
case ORANGE:
case PAPAYA:
numberOfLetters = 6;
break;
default:
throw new IllegalStateException (“Wut” + fruit);
}
int numberOfLetters = switch (fruit) {
case PEAR -> 4;
case APPLE, MANGO, GRAPE -> 5;
case ORANGE, PAPAYA -> 6;
}

Java 13

GraalVM

Enjoy your visit

--

--

--

Blogs on tech & society.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is pipenv ?

Want to learn Flutter? Don’t know where to start? here are some good resources to master Flutter

How to create singleton in Dart

Rocket Fuel Ventures Speaker Event: Justin Trugman

Code Is the Ultimate Junior Developer

images/cl.png

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
ski n

ski n

Blogs on tech & society.

More from Medium

Useless Java: Day 17

Can there be static imports in Java

Collections in Java

Convert XML to Word in Java