December 2018
Intermediate to advanced
1248 pages
33h 55m
English
In Chapter 2, you were shown how to compile a Java program into bytecode using the javac compiler and then run the resulting .class file(s) using the Java launcher java. This is how Java programs have been compiled and run since Java’s beginning, and it is the method that you will use when developing applications. However, beginning with JDK 11, it is possible to compile and run some types of simple Java programs directly from the source file without having to first invoke javac. To do this, pass the name of the source file, using the .java file extension, to java. This causes java to automatically invoke the compiler and execute the program.
For example, the following automatically ...
Read now
Unlock full access