java 的switch 既然不支持 String类型的
不能打为字符串类型的值。只有可转换int值或枚举常量是允许的。
只有可以转换int的排除了 --> boolean
char 难道是枚举????
看来java中 switch用处还真不太大。
-- 不过在 jdk7.0 后支持了。。
这样也挺不错的, 不过还没有试过。
Reproduced please indicate the author and the source, and error a link to this page.
text link:
//xiaochun.zrlog.com/113.html