Dart编程实例 - Dart Switch Case 语句
void main() {
var grade = "A";
switch(grade) {
case "A": { print("Excellent"); }
break;
case "B": { print("Good"); }
break;
case "C": { print("Fair"); }
break;
case "D": { print("Poor"); }
break;
default: { print("Invalid choice"); }
break;
}
}
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!