package com.lyc.struct;
public class SwitchDemo02 {
public static void main(String[] args) {
String name = "史蒂夫";
//JDK7的新特性,表达式结果可以说字符串
//字符的本质还是数字
switch (name){
case "史蒂夫":
System.out.println("史蒂夫");
break;
case "张三":
System.out.println("张三");
break;
case "李四":
System.out.println("李四");
break;
case "王五":
System.out.println("王五");
break;
default:
System.out.println("未知");
}
}
}