Solved

What Is the Output of the Following Java Code? Int

Question 7

Multiple Choice

What is the output of the following Java code? int x = 57; int y = 3; switch (x % 9) {case 0: case 1: y++; case 2: y = y - 2; break; case 3: y = y + 2; case 4: break; case 5: case 6: y = y + 3;} System.out.println(y) ;


A) 2
B) 5
C) 6
D) 57

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions