Java learns from scratch (identifiers and keywords), starts from scratch and
Identifier, keyword, comment 1, identifier
The packages, classes, methods, parameters, and variable names in Java are composed of letters, numbers, underscores (_), and dollar signs ($) in any order,
Identifier: it cannot start with a number or be a reserved keyword in JAVA.
For example, yourname, yourname_dxh, li_yourname, and $ yourname are all valid identifiers.
Class, 67.9, Hello World is illegal, class is a keyword, 67.9 starts with a number, there is a space in the middle of Hello World
Ii. Keywords
Keywords in Java
| Abstract |
Boolean |
Break |
Byte |
Case |
Catch |
Char |
| Class |
Continue |
Default |
Do |
Double |
Else |
Extends |
| False |
Final |
Finally |
Float |
For |
If |
Implements |
| Import |
Instanceof |
Int |
Interface |
Long |
Native |
New |
| Null |
Package |
Private |
Protected |
Public |
Return |
Short |
| Static |
Synchronized |
Super |
This |
Throw |
Throws |
Transient |
| True |
Try |
Void |
Volatile |
While |
Assert |
Enum |
3. Notes
// Indicates a single line comment. The comment content is here, and a line is commented. Add a double slash before the content to be commented (//)
/** Multi-line comment, starting with a single slash plus a star (/*), ending with a star plus a single slash */
/*** Document comments * start with a single slash plus two star tags (/**), and add a slash to a star tag (*/) at the end of * The content annotated with this method will be interpreted as a formal document of the program and can be included in the document generated by a tool such as javadoc */