| |
- Enter the above code into a file named HiWorld.java. Since the name of the public
class is HiWorld, the name of the file must be HiWorld.java
- To compile the file, type "javac HiWorld.java". javac is the name
of the Java compiler. It translates your Java program into bytecode. The
bytecodes will be stored in a file called HiWorld.class.
- To run the file, type "java HiWorld". java is the name of the Java
interpreter. It runs the bytecode produced in the previous step.
|