Java 关键字及其作用
目录
JAVA 关键字及其作用............................................ ......................................................................... 1
一、 关键字总览:...............................................................................................................................2
二、 详细解释....................................................................................................................................3
1.
访问控制
.......................................................................................................................................3
1) private 私有的.........................................................................................................................................3
2) protected 受保护的................................................................................................................................3
3) public 公共的..........................................................................................................................................3
2.
类、方法和变量修饰符
...............................................................................................................4
1) abstract 声明抽象...................................................................................................................................4
2) class 类....................................................................................................................................................4
3) extends 继承、扩展...............................................................................................................................4
4) nal 最终、不可改变.............................................................................................................................4
5) implements 实现.....................................................................................................................................4
6) interface 接口..........................................................................................................................................5
7) nave 本地..............................................................................................................................................5
8) new 新,创建............................................................................................................................................5
9) stac 静态...............................................................................................................................................5
10) stric%p 严格,精准..................................................................................................................................5
11) synchronized 线程、同步.....................................................................................................................6
12) transient 短暂.......................................................................................................................................6
13) volale 易失..........................................................................................................................................6
3.
程序控制语句
...............................................................................................................................6
1) break 跳出,中断...................................................................................................................................6
2) connue 继续..........................................................................................................................................7
3) return 返回.............................................................................................................................................. 7
4) do 运行....................................................................................................................................................7
5) while 循环...............................................................................................................................................7
6) if 如果...................................................................................................................................................... 7
7) else 否则................................................................................................................................................. 7
8) for 循环................................................................................................................................................... 8
9) instanceof 实例.......................................................................................................................................8
10) switch 观察...........................................................................................................................................8
11) case 返回观察里的结果.......................................................................................................................8
12) default 默认..........................................................................................................................................8
4.
错误处理
.......................................................................................................................................9
1