The JLS says:
»While true and false might appear to be keywords,
they are technically Boolean literals (§3.10.3).«
What is a keyword?
I used to think that a keyword is a word(s)
You'll need to adjust your intuition.
-------------------------------------------------------------
whose meaning is given by the language specification
3.10.3. Boolean Literals
The boolean type has two values, represented by the boolean literals
true and false, formed from ASCII letters.
BooleanLiteral: one of
true false
A boolean literal is always of type boolean (§4.2.5).
------------------------------------------------------------
and that cannot be declared as an identifier in source code.
3.8. Identifiers
An identifier is an unlimited-length sequence of Java letters and Java
digits, the first of which must be a Java letter.
Identifier:
IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral
----------------------------------------------------------------
I believe that all of this applies to »true«.
The meaning of true is given in the JLS.
A BooleanLiteral cannot be used as an Identifier.
------------------------------------------------------------
So, why then it is not called a keyword in Java?
3.9. Keywords
50 character sequences, formed from ASCII letters, are reserved for use
as keywords and cannot be used as identifiers (§3.8).
Keyword: one of
abstract continue for new switch
assert default if package synchronized
boolean do goto private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while
Because it is a boolean literal?
boolean t_;
if ( !t_ )
t_ = true;