嵌式结构
if (number<=100){
System.out.println("厉害");
if (number>=50){
System.out.println("加油");
单选择
String s =scanner.nextLine();
//判断字符是否相等
if (s.equals("Hello"))
System.out.println(s);
System.out.println("end");
两个选择
if (score>60){
System.out.println("及格");
}else{
System.out.println("不及格");
}
多选
if (score ==100){
System.out.println("恭喜满分");
}else if (score<100 &&score >=90){
System.out.println("A级");
}else if (score <90 &&score>=80){
System.out.println("B");
}else if (score <80 &&score>=70){
System.out.println("C");
}else if (score <70 &&score>=60) {
System.out.println("D");
}else if (score <60 &&score>=0){
System.out.println("不及格");