The source file contained a syntax error (in this case a missing "
) and could not
be compiled.
Notice that the compiler says there are "3 errors" even though there is really only one. This is common. Sometimes when there is a syntax error the compiler gets confused and prints messages that are misleading.
Find the first error, use the text editor to correct the program, save it (to the same filename) and compile again.
The next chapter will discuss syntax further and show more details.
To run the program, do this:
The program prints out Hello World!
The command java Hello starts up the Java Virtual Machine with the bytecode file Hello.class.
Aggravations: don't use the extension class with the file name. Also, the command is java without a "c" at the end.
(Review: ) Could Hello.class be sent to a printer?