1. Comments:
Java provides the following types of comments:
a. in-line comment: //
b. multi-line comment: /* ... */
c. doc comment: /** .. */
2. Identifier rules: Valid identifiers must start with a letter, a dollar sign, or an underscrore.
3. Java also contains the const and goto keywords, which are reserved but not used. So you cannot use them as identifiers in code.
4. String literals use the following escape sequences:
\n -- new line.
\t -- tab
\b -- backspace
\r -- carriage return
\\t -- shows escape sequences
\' -- single quote
\" -- double quote
5. Jave includes eight primitive data types - boolean, byte, char, double, float, int, long, and short.
6. Java programming language includes five literals - string, integral, char, floatingpoint, and boolean.
Integral literals can be decimal, octal, or hexadecimal format.
String literals are defined between double quotes and
Char literals are defined between signle quotes.