Java中Switch Case语句的用法

版权声明:本文为博主原创文章,转载请注明出处! https://blog.csdn.net/JavaAndroid730/article/details/62215584

switch中default方法为case之外的判断。

switch支持部分基本数据类型(primitive data types),如:byte、short、int、long、char;不支持boolean、float、double


支持Enum类型、String、和部分基本类型的包装类(如:Character、Byte、Short、Integer);


猜你喜欢

转载自blog.csdn.net/JavaAndroid730/article/details/62215584