You have written the following Java program:
class ExamPrep {
public static void main(String[] args){
printColor(2);
}
private static void printColor(int x) {
switch (x) {
case 1:
System.out.println("red");
case 2:
System.out.println("blue");
case 3:
System.out.println("green");
default:
System.out.println("something else");
}
}
}
What will the output be when you run this program? Choose the correct answer:
A. red
B. blue
C. green
D. something else
E. blue, green, something else