资料来源:官网 http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
刷牛客网选择题时,遇到判定哪些关键字是java中的关键字。一时间有点蒙,赶紧看oracle对其的定义。故翻译留下备用。
java关键字
以下是java编程语言当中关键字的一个列表。在你的程序当中,你不能使用下面任何一个关键字作为标志符。const和goto是保留字,尽管它们两个现在已经不再使用了。true,false,null看起来似乎是关键字,但他们事实上,只是单纯的字面量而已。程序中,你也不可以使用它们作为标志符。
abstract | continue | for | new | switch |
assert *** | default | goto * | package | synchronized |
boolean | do | if | 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 |
* | not used | |
** | added in 1.2 | |
*** | added in 1.4 | |
**** | added in 5.0 |