package com.song.struct;
public class SwitchDemo02 {
public static void main(String[] args) {
String name = "违心";
//JDK7新特性,表达式结果可以是字符串!!!
//字符的本质还是数字
//反编译 java---class(字节码文件)---反编译(IDEA)
switch (name){
case "违心":
System.out.println("违心");
break;
case "心弦":
System.out.println("心弦");
break;
default:
System.out.println("弄啥嘞!");
}
}
}
struct switch study Hard.02
最新推荐文章于 2024-08-24 17:09:16 发布