一.if语句
1.if(条件语句){......}适用于单个对象单种情况
2.if(条件语句){......}else{......} 适用于单个对象单种情况
3.if(条件语句){.......}else if{...}else if{...}else适用于多个对象单种情况或者单个对象多种情况
二.switch语句(只能是常量,语句后面必须有break,常量不能相同)
1.swith(a){
case常量1:
语句块1
break;
case常量2:
语句块2
break;
...
default:
语句块
break;
}