Multiple choice java

Which one of the following identifiers is not a keyword?

  1. null

  2. transient

  3. assert

  4. const

Reveal answer Fill a bubble to check yourself
A Correct answer
AI explanation

In Java, 'null' is a reserved literal, not a keyword — it represents the null reference value but cannot be used as an identifier or in keyword-specific syntax the way true keywords are; technically it's classified separately in the Java Language Specification. 'transient', 'assert', and 'const' are all reserved words: transient and assert are actual keywords (assert added in Java 1.4), while const is reserved as a keyword even though it's unused (a leftover from C++ compatibility, to prevent it being used as an identifier). So null is the odd one out — a literal, not a keyword.