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
3, 4 and 5
B
2,3, 4 and 6
C
1 and 3
D
3 and 4
Correct answer: 2,3, 4 and 6
Explanation
Correct answer: 2,3, 4 and 6.