One: initial Java
1: Outer frame:
Class name After class must be the same as the file name
Naming method: 1) Composition can only have _ $ alphanumeric
2) numbers cannot begin
3) First letter must be capitalized
4) See the meaning of the name
2, Inner frame
2.main method
A class method has only one main method entry
3, Output statement
Println means to end this sentence after the line, can not add, write as print;
The contents of the output in parentheses are enclosed in double quotation marks;
A semicolon must be added at the end of sentence;
Second, the complete HelloWorld
The output of the console is
Three, escape character
1,\n the meaning of a newline,
Example:
2,\t An empty tab is equivalent to tab
Example:
Four, using CMD to compile the execution
1, build notepad, change suffix name Helloworld.java
2, write content
3, compile the Javac file name. java
4, execute Java file name
Exam NOTES:
- Java is the launch of the Sun company.
- Single-line comment//, multiline comment/* */.
- The class name must be decorated with public.
- Only one statement is written on a single line.
- System,string first letter S must be capitalized.
First knowledge of java:1