Multiple choice technology programming languages

What argument types are legal for switch statements? (Choose all that apply)

    1. char
    1. byte
    1. short
    1. int
    1. boolean
Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

Java switch statements accept integral types that can fit in an int: char, byte, short, and int (and their wrapper classes Character, Byte, Short, Integer). Long and float types are not permitted, and boolean is explicitly excluded.