JAVA study notes-the beginning of HelloWorld dream

Program development step description

Three steps of java program development: writing, compiling and running .
Insert picture description here

write

Create a new txt file and name it HelloWorld, open it and write the code, save with Ctrl+s, and then modify the file suffix to .java
Insert picture description here
Insert picture description here
Pay attention to writing under the English input method

Compile the HelloWorld.java file

win+R and enter cmd to open the command prompt and compile the HelloWorld.java file.
Insert picture description here

Generate the corresponding class file after compilation
Insert picture description here

run

Insert picture description here

About the error

Compilation failure is likely to be a punctuation error, and the other error may be a wrong letter.
The errors shown in the figure below are all punctuation errors in the java source file. The number 3 represents the third line. The content after the "error" colon is the cause of the error.
Insert picture description here

Pay special attention to symbols
Insert picture description here
** This note is based on the creation of the b-site learning video. Corresponding portal

Guess you like

Origin blog.csdn.net/weixin_45746074/article/details/113177742