Identifiers
Identifiers are used for class names, method names, and variable names. An identifier may
be any descriptive sequence of uppercase and lowercase letters, numbers, or the underscore
and dollar-sign characters. They must not begin with a number, lest they be confused with a
numeric literal. Again, Java is case-sensitive, so VALUE is a different identifier than Value.
Some examples of
valid identifiers are
AvgSalary counting a2 $testing this_is_ok_to
Invalid identifier names include these:
2counting high-temperature Not/ok-to
Identifiers are used for class names, method names, and variable names. An identifier may
be any descriptive sequence of uppercase and lowercase letters, numbers, or the underscore
and dollar-sign characters. They must not begin with a number, lest they be confused with a
numeric literal. Again, Java is case-sensitive, so VALUE is a different identifier than Value.
Some examples of
valid identifiers are
AvgSalary counting a2 $testing this_is_ok_to
Invalid identifier names include these:
2counting high-temperature Not/ok-to