关于关键字,我在很多书上看到不同的说明,在最新的SCJP考试指南上并没有说它们是关键字,请问到底是不是呢?请顺便给个资料证明一下SCJP中java的50个关键字是:abstract assertboolean break bytecase catch char class const continuedefault do doubleelse extends enumfinal finally float forgotoif implements import instanceof int interface longnative newpackage private protected publicreturnshort static strictfp super switch synchronizedthis throw throws transient tryvoid volatilewhile
关键字:用过了EditPlus、eclipse之类的java编译器的都知道它们带有关键字变色的效果吧?
你注意看过了没有,false、true、null 都变色了。
这就说明它是关键字。
再看看 const和goto吧,它们也是关键字,即便它们没被使用,但是你写出来就是变色的。具体的我不好解释,我自己也记的不是很清晰,不能误人子弟
http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.9