Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Java Operators

Java Control Statements

Object Oriented Programming

Java Built-in Classes

Java File Handling

Java Error & Exceptions

Java Multithreading

Java Synchronization

Java Networking

Java Collections

Java Interfaces

Java Data Structures

Java Collections Algorithms

Advanced Java

Java Miscellaneous

Java APIs & Frameworks

Java Class References

Java Useful Resources

Java 11 - Compiler Free Launch (Single File Source Code)



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.

Advertisements