A Simple Program
上一节
下一节
Java Programming Procedures
Step 1: Create a source file.
![]()
Step 2: Define a class. (文件名和public类名对应)

Step 3: Define main method.

Step 4: Compile source file to bytecode file. (编译之前不要忘了保存源文件)
Use javac command in the target directory.

Step 5: Run the program using java command and the argument is main class name.


