关键字
和其它语言一样,Java中也有许多关键字(Keywords,也叫保留字),如public,static,int等。这些关键字不能当作标识符使用。下面列出了Java中的关键字:
| abstract | assert*** |
|---|---|
| bollean | break |
| byte | case |
| class | const* |
| catch | char |
| continue | default |
| do | double |
| ese | enum**** |
| extends | false |
| final | finally |
| float | for |
| goto* | if |
| implements | import |
| instanceof | int |
| interface | long |
| native | new |
| null | package |
| private | protected |
| public | return |
| short | static |
| stricfp** | synchronized |
| super | this |
| throw | transient |
| true | try |
| void | volatile |
| while |
注:*表示该关键字尚未启用;***表示在Java1.2添加的,***表示在Java1.3添加的;****表示在Java5.0添加的。

被折叠的 条评论
为什么被折叠?



