Java关键字

类别 关键字 说明
访问控制 privte 私有的
protected 受保护的
public 公共的
-- -- --
类、方法和变量修饰符 abstract 声明抽象
class
extends 扩充,继承
final 最终值,不可改变的
implements 实现(接口)
interface 接口
native 本地,原生方法(非 Java 实现)
new 新,创建
static 静态
strictfp 严格,精准
synchronized 线程,同步
transient 短暂
volatile 易失
-- -- --
程序控制语句 break 跳出循环
case 定义一个值以供 switch 选择
continue 继续
default 默认
do 运行
else 否则
for 循环
if 如果
instanceof 实例
return 返回
switch 根据值选择执行
while 循环
-- -- --
错误处理 assert 断言表达式是否为真
catch 捕捉异常
finally 有没有异常都执行
throw 抛出一个异常对象
throws 声明一个异常可能被抛出
try 捕获异常
-- -- --
包相关 import 引入
package
-- -- --
基本类型 boolean 布尔型
byte 字节型
char 字符型
double 双精度浮点
float 单精度浮点
int 整型
long 长整型
short 短整型
-- -- --
变量引用 super 父类,超类
this 本类
void 无返回值
-- -- --
保留关键字 goto 是关键字,但不能使用
const 是关键字,但不能使用
null
原文地址:https://www.cnblogs.com/yu011/p/12632489.html