Echo.java
with the Java code shown
here:
class Echo { public static void main (String[] args) { System.out.println(args[0]); System.out.println(args[0]); } }
If compilation succeeds, the compiler creates a file namedjavac Echo.java
Echo.class
. This file contains the
bytecodes of your application, i.e. the code that is suitable
for the hypothetical system called Virtual Java Machine to run
your program on.
If compilation fails, make sure you typed in and named the program
exactly as shown above.
And the program displays on the standard output:java Echo hello
hello hello