int I=1, j=0 switch(i) { case 2: j+=6; case 4: j+=1; default: j +=2; case 0: j +=4; } What is the value of j at line 16?()
A. 0 B. 1 C. 2 D. 4 E. 6
public class WhileFoo { public static void main (String args) { int x= 1, y = 6; while (y--) {x--;} system.out.printIn(“x=” + x “y =” + y); } } What is the result?()
A. The output is x = 6 y = 0 B. The output is x = 7 y = 0 C. The output is x = 6 y = -1 D. The output is x = 7 y = -1 E. Compilation will fail.
public class X { public static void main (String args) { byte b = 127; byte c = 126; byte d = b + c; } } Which statement is true?()
A. Compilation succeeds and d takes the value 253. B. Line 5 contains an error that prevents compilation. C. Line 5 throws an exception indicating “Out of range” D. Line 3 and 4 contain error that prevent compilation. E. The compilation succeeds and d takes the value of 1.