TestSwitch

public class TestSwitch {

public static void main(String[] args) {
// TODO 自动生成的方法存根
String x=args[0];
switch(x){
case"春天":
System.out.println("春天般的温暖");break;
case"夏天":
System.out.println("夏天一样火热");break;
case"秋天":
System.out.println("秋风扫落叶一般");break;
default:
System.out.println("冬天一样残酷无情!");
}

}

}

原文地址:https://www.cnblogs.com/wlp1115/p/6538441.html