?? testswitch.java
字號:
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class TestSwitch
{
public static void main(String[] args)
{
//聲明變量score,并為其賦值為'C'
char score = 'C';
//執(zhí)行swicth分支語句
switch (score)
{
case 'A':
System.out.println("優(yōu)秀.");
//break;
case 'B':
System.out.println("良好.");
//break;
case 'C':
System.out.println("中");
//break;
case 'D':
System.out.println("及格");
//break;
case 'F':
System.out.println("不及格");
//break;
default:
System.out.println("成績輸入錯誤");
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -