JAVA中的关键字
【数据类型】
小写
class //类
interface //接口
byte //字节
short //短整型
int //integer整型
long //长整型
float //浮点型
double //双精度浮点型
char //字符
void //空的
【定义值】
true
false
null
【流程控制】
if // 如果
esle //否则
switch //开关,切换
case //案例
default // 默认,缺省
while //当…时候
do //
for //循环
break //中断
continue //继续进入下一个循环
return //返回
【修饰符 modifier】
private //私有的
protected //受保护的
public //公有的
abstract //抽象的
final //最终的
static //静态的 non-static //动态的
synchronized //同步
extends //扩展,继承
implements //实现
new //新建
this //这个
super //超类的,父类
instanceof //是否是xxx的实例
try //尝试
catch //抓捕,抓取
finally //最终
throw //抛
throws //
package //包
import //导入,export //导出
native //本地的
strictfp //
transient //暂时的
volatile //
assert //断言
规范
1.包名
com.itl8zhang.java.xxx.HelloWorld
2.函数
public.int adddTwoNumberds(int a,int b,){....}
3.常量
String BRAND="benz";
注释
//xxxxx 单行注释
/* xxxxx*/ 多行注释