Comments:
Single-line comment//comment content
Multiline comment/* Comment content */
Document Comments/** Comments */
"Comments are used to make it easier for writers and others to read the source code and to enhance their understanding of the code.
Where a document comment is basically the same as a multiline comment, the only difference is that the document comment can use the Javadoc.exe command to generate the API document "
Key words
Keywords are special meanings given by the Java language, words with specialized purpose, and keywords in Java are lowercase.
1 Abstract assert Boolean Break byte2 Case Catch Char class Const3 Continue default Do Double Else4 enum extends Final finally float5 for Goto if Implements Import6 instanceof int Interface Long native7 New Package Private protected Public8 return STRICTFP Short Staticuper9 Switch synchronized This Throw throwsTen transient Try void volatile
Identifier
Identifiers are the meanings of names, and all names are collectively referred to as identifiers. In Java, you often define classes, methods, and variables, and always give them names when defining them, which are identifiers.
1. Constituent elements
English characters: a-z,a-z "all Letters"
Number: 0-9 "all Numbers"
Symbols: _ With $
2. Rules for identifiers
Cannot start with a number
You cannot use keywords
Strictly case-sensitive, do not limit the length of the naming, as far as possible to achieve the name of understanding
Java annotations, keywords, and identifiers