java关键字列表

时间:2016-08-31
任何语言都有关键字,java也不例外,本文章向大家列出java中常用的关键字,这些关键字不能作为程序标识符。需要的朋友可以参考一下本文章。

关键字constgoto保留,即使他们目前没有使用。truefalsenull似乎是关键字,但它们实际上是常量; 你不能把它们作为你的程序的标识符。

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

注:

  1. * 不曾用过
  2. ** 在1.2中加入
  3. *** 在1.4中增加
  4. **** 在5.0中加入