package base.baidua;

public class SwitchDemo1 {
public static void main(String[] args) {
//case穿透,//switch匹配具体的值
char grade = 'K';

    switch (grade){
        case 'A':
            System.out.println("优");
            break;//可选,不添加会穿透
        case 'B':
            System.out.println("良好");
            break;
        case 'C':
            System.out.println("及格");
            break;
        case 'D':
            System.out.println("挂科");
            break;
        default:
            System.out.println("未知");
    }
}

}