Java 11 – Compile free Launch

  • Post author:
  • Post category:Java 11
  • Post comments:1 Comment
Java 11 - Compile free Launch

This topic is about Java 11 – Compile free Launch.

Java 11 onwards, now a single java file can be tested easily without compiling as well. Consider the following example −

ApiTester.java

public class Tester {
   public static void main(String[] args) {
     System.out.println("Hello World!"); 
   }
}

Old way of running file

$ javac ApiTester.java
$ java Tester
Hello World!

New way of running file

$ java ApiTester.java
Hello World!

This new feature will help developer to quick test a functionality without need to compile before running a code.

In this topic we learn about Java 11 – Compile free Launch. To know more, Click Here.

This Post Has One Comment

Leave a Reply