Java 语言关键字
这是 Java 编程语言中的关键字列表。您不能在程序中使用以下任何一种作为标识符。关键字const
和goto
被保留,即使它们当前未被使用。 true
,false
和null
看起来像关键字,但实际上是 Literals。您不能在程序中将它们用作标识符。
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 |
** | | 在 1.2 中添加 |
*** | | 在 1.4 中添加 |
**** | | 在 5.0 中添加 |