问题:[选择题]
A.byte B.int C.boolean D.char
● 参考解析
switch语句在数据类型上受到限制,只能使用int、byte、short、char类型。如果比较的数据类型是float型或者boolean类型,就只能使用if-elseif结构。
推荐题目
相关标签