其实字符也是数值类型
System.out.println((int)‘a’);
System.out.println((char)97);
输出结果:97
a
数值和符号之间可以相互转化,所以在switch…case…中除了能适用于数值,也能使用字符
其实字符也是数值类型
System.out.println((int)‘a’);
System.out.println((char)97);
输出结果:97
a
数值和符号之间可以相互转化,所以在switch…case…中除了能适用于数值,也能使用字符