Syntactic Structure
switch (switch-expression) {
case value1: statement(s)1;break;
case value2: statement(s)2;break;
...
case valueN: statement(s)N;break;
default: statement(s)-for-default;
}
Data Type
The swith-expression must yield a value of char, byte, short, int, or String type and must always be enclosed in parentheses. (swith-expression支持char, byte, short, int, or String5种数据类型,其中String是JDK1.7后增加的类型)
break Statement
Do not forget to use a break statement when one is needed. Once a case is matched, the statements starting from the matched case are executed until a break statement or the end of the switch statement is reached. (程序会从匹配上的case开始执行,一直到break语句或switch语句结束,切勿忽略break语句的作用)

