Editing Java source code
Editing Java source code can use any unformatted text editor, and programs such as sublime Text,uedit,editplus can be used on the Windows platform.
Java is strictly case-sensitive, save file as Xxx.java
The following procedure for the classic Hello World program
1 Public class HelloWorld 2 {3 Public Static void Main (String args[]) 4 {5 System.out.println ("HelloWorld"); 6 }7 }
Compiling Java source code
Press "Windows+r" key to enter the command line window, navigate to the Command Line window under the saved path of the source code, and enter the following command under the path:
1 javac Helloworld.java
Compile the Java source code and generate the bytecode Helloworld.class
Running Java programs
In the Command Line window, navigate to the program save path and enter the following command:
1 java HelloWorld
Basic rules for Java programs
Java programs are purely object-oriented programming (OOP) programming languages, so Java programs must exist in the form of Class (Class), which is the smallest program unit in a Java program. Java programs do not allow executable statements and methods to exist independently, so the program part must be placed in the class definition class.
Java Learning Essay (II.)