switch语句后的表达式支持的数据类型()
A: byte
B: short
C: char
D: int
E: long
A: byte
B: short
C: char
D: int
E: long
举一反三
- 对于“switch(a)”表达式中的变量a,它可以被声明为哪些合法数据类型? A: boolean, byte, char, short, int, long B: boolean, byte, char, short, int C: byte, char, short, int D: boolean, byte, char, short, int, long, float, double
- switch语句后面的表达式,可以下面哪些类型的表达式? A: 整数类型(包括byte, short, int, long等) B: 小数类型(包括float, double) C: 字符类型(包括char,String) D: 枚举类型
- 下列哪个不能作为switch表达式的数据类型 A: short B: int C: long D: char
- switch条件表达式中可以使用的数据类型是( ) A: char B: long C: int D: byte
- 下列不能作为switch表达式参数的数据类型是: A: int B: char C: long D: short