java 关键字: abstract boolean break byte case catch char class const+ continue default do double else extends final finally float for goto+ if implements import instanceof int interface long native new package private protected public return short static super switch synchronized this throw throws transient try void volatile whileJAVA关键字不能作为标识符 +号为保留
你在哪儿看到SL275上说true,false,null是关键字了,SL275上的原话是: the literals true,false,and null are lowercase,not uppercase as in the C++ language.Strictky speaking,these are not keyworrds but literals;however,the distinction is academic。 意思是所他们严格说不是关键字,而只是字面量,但是这个区别只是学术上的。 换言之,可以将他们看作关键字!但实际不是!
sl_275最新版本:Reversion E.1 May 2001 里面说true false null都不是java的关键字。(其实旧版本也是这么说的)。 但是要注意的一点是,他们虽然不是关键字,但是照样也是不能用作标识符的。这一点是容易混淆的。java 的关键字总共为48个。 上面skyyoung(路人甲)列了47个(呵呵,我有心数了一下),少了一个strictfp。
abstract
boolean
break
byte
case
catch
char
class
const+
continue
default
do
double
else
extends
final
finally
float
for
goto+
if
implements
import
instanceof
int
interface
long
native
new
package
private
protected
public
return
short
static
super
switch
synchronized
this
throw
throws
transient
try
void
volatile
whileJAVA关键字不能作为标识符
+号为保留
the literals true,false,and null are lowercase,not uppercase as in the C++ language.Strictky speaking,these are not keyworrds but literals;however,the distinction is academic。
意思是所他们严格说不是关键字,而只是字面量,但是这个区别只是学术上的。
换言之,可以将他们看作关键字!但实际不是!
里面说true false null都不是java的关键字。(其实旧版本也是这么说的)。
但是要注意的一点是,他们虽然不是关键字,但是照样也是不能用作标识符的。这一点是容易混淆的。java 的关键字总共为48个。
上面skyyoung(路人甲)列了47个(呵呵,我有心数了一下),少了一个strictfp。