The switch statement in Java is used to evaluate an expression against multiple possible values and execute the corresponding code block.
It is a cleaner alternative to using multiple if-else-if statements when checking a variable for equality against several constant values.
Each possible value is defined using a case label, and the block executes if a match is found.
A default case can also be used when no match occurs.
Example:
switch(day)
case 1: {System.out.println("Monday");
break;}
The switch statement supports values like int, char, string, etc.
Hence, the correct answer is (D) switch.