char grade = 'C';String info = "";switch (grade){ case 'A': info = "优秀"; break; case 'B': info = "良好"; case 'C': info = "及格"; break; case 'D': info = "你需要再努力努力"; break; default: info = "未知等级";}System.out.println(info + ":你的等级是: " + grade);