All JDK Features

Refer below link to learn java 8 features.
Learn about Java 8 Features


Interface Private Methods -
In Java 9, we can create private methods inside an interface. Interface allows us to declare private methods that help to share common code between non-abstract methods. Before Java 9, creating private methods inside an interface cause a compile time error.

JShell: The Java Shell (REPL) -
It is an interactive Java Shell tool, it allows us to execute Java code from the shell and shows output immediately. JShell is a REPL (Read Evaluate Print Loop) tool and run from the command line. It is benificial, if we want to test our business logic and get result immediately.


Local Variable Type Inference -
Java has now var style declarations. It allows you to declare a local variable without specifying its type. The type of variable will be inferred from type of actual object created.


Running Java File with single command -
One major change is that you don’t need to compile the java source file with javac tool first. You can directly run the file with java command and it implicitly compiles.

Reading/Writing Strings to and from the Files -
Java 11 strives to make reading and writing of String convenient.

It has introduced the following methods for reading and writing to/from the files:

  • readString()

  • writeString()