Java的关键字:
abstract | assert | boolean | break | byte |
case | catch | char | class | const |
continue | default | do | double | else |
enum | extends | final | finally | float |
for | goto | if | implements | import |
instanceof | int | interface | long | native |
new | package | private | protected | public |
return | strictfp | short | static | super |
switch | synchronized | this | throw | throws |
transient | try | void | volatile | while |
transient:被transient关键字修饰的变量不参与序列化和反序列化。
volatile:可以保证内存可见性和有序性,但不能保证原子性。
const、goto和strictfp都是java的保留关键字,strictfp是对浮点类型做精确运算的一个关键字。
boolean类型的字面值true和false虽然不是关键字,但是不能使用true和false来做标识符。