switch中case语句的可用类型

来源:互联网 发布:鲲鹏网络传媒有限公司 编辑:程序博客网 时间:2024/05/16 06:17

 JDK1.7以前case语句只支持byte,short,char,int和枚举类型;

JDK1.7以后支持String类型。

0 0
原创粉丝点击