Java共有50个关键字,其中goto和const是作为保留字。
关键字名称 | 作用 |
---|---|
byte | 基本数据类型——整型,1个字节 |
short | 基本数据类型——短整型,2个字节 |
int | 基本数据类型——整型,4个字节 |
long | 基本数据类型——长整型,8个字节 |
float | 基本数据类型——单精度浮点型,4个字节 |
double | 基本数据类型——双精度浮点,8个字节 |
boolean | 基本数据类型——布尔数据类型,其数值只能为true或false |
char | 基本数据类型——字符类型,2个字节,Unicode字符集 |
enum | |
abstract | |
assert | |
break | |
continue | |
switch | |
case | |
default | |
catch | |
class | |
for | |
do | |
while | |
if | |
else | |
extends | |
final | |
finally | |
implements | |
import | |
instanceof | |
interface | |
native | |
new | |
package | |
private | |
protected | |
public | |
return | |
static | |
strictfp | |
super | |
synchronized | |
this | |
throw | |
throws | |
transient | |
try | |
void | |
volatile | |
const | 保留字,未使用 |
goto | 保留字,未使用 |