This section is divided into three speakers. Java Overview, section Two describes installing the JDK Configuration environment variable Section III speaks of the classic Hello World
1. Create a new TXT text
1 Public class chapter0102{2 Public Static void 3 System.out.println ("The first chapter first says Hello World third time homework!") "); 4 }5 }
2. Change the file suffix to. java. Put in an easy-to-access path (I put it on the e-drive)
3. Under the console, compile the Java you just wrote
Javac Chapter0102.java
If the file name differs from the class name, an error occurs: Class chapter0102 is public and should be named chapter0102 ....
After a successful run, it is spoken by the JVM. Java compiled as a. class
3. Running chapter0102
Running Java chapter0102 under the console
Console output:
java1234 Tutorial Series notes S1 Java SE 0101 HelloWorld