java关键字简要总结

来源:互联网 发布:知乎飞机杯 编辑:程序博客网 时间:2024/05/01 20:03


//8种基本数据类型

byte
short
int
long
float
double
char
boolean
true
false


//选择、循环、转移语句

if
else
switch
case
default
do
while
for
continue
break
return
null

public 公共的
protected 受保护的
private 私有的
class
extends 继承
new 用于实例化对象
interface 接口
implements 实现
void 表示该方法没有返回值
static 静态的
final 最终的
abstract 抽象的
this 本类对象的引用
super 父类对象的引用
package
import 导入
instanceof 判断前面的对象是否属于后面的数据类型
transient 被这个关键字修饰的成员变量不会参与序列化
native 本地的
synchronized 同步的

enum 枚举

assert 断言

const 保留字

goto 保留字


//和异常相关的关键字
try
catch
finally
throws
throw

1 0
原创粉丝点击