Java Programming
Accenture Technical PrimermediumJava Programming01 Introduction To Java

Accenture Java Programming Practice Question

Fill in the appropriate data type for the Java switch statement: switch (____) { case value1: ... case value2: ... default: System.out.println("Hello"); }

Answer options

A
byte
B
float
C
boolean
D
double

Correct answer: byte

Explanation

Quick AnswerThe correct answer is byte because it directly addresses the core logic of Java Programming.

Java switch supports byte, short, char, int, their wrapper classes, enums, and String. Among the options, byte is valid.

Related Accenture Java Programming questions

Practice more Accenture Java Programming questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!