NoReservedWords
Misconception:
Anything that starts with a letter and consists of just letters and digits can be used as an identifier (name of a variable, method, or class).
Incorrect
Every sequence of letters and digits starting with a letter can be used as an identifier
Correct
Some character sequences are reserved for use as keywords and cannot be used as identifiers
CorrectionHere is what's right.
Here is what's right.
Java has some keywords (e.g., new
, return
, if
, int
)
and some literals (true
, false
, and null
)
that are reserved and cannot be used by a programmer as identifiers.
That means it is not possible to use these words to name variables, methods, or classes.
Language
Java