Accenture Java Programming Practice Question
switch(a) { default: System.out.println("Welcome"); } Of which data types can the variable a be? 1. long 2. byte 3. int 4. char 5. float 6. shortAnswer options
A
2,3, 4 and 6
B
3, 4 and 5
C
3 and 4
D
1 and 3
Correct answer: 2,3, 4 and 6
Explanation
Correct answer: 2,3, 4 and 6.