int i = 1,j = -1; switch (i) { case 0, 1:j = 1; case 2: j = 2; default; j = 0; } System.out.println(“j=”+j); What is the result?()
A. j = -1 B. j = 0 C. j = 1 D. j = 2 E. Compilation fails.
class Base { Base() { System.out.print(“Base”); } } public class Alpha extends Base { public static void main( String[] args ) { new Alpha(); new Base(); } } What is the result?()
A. Base B. BaseBase C. Compilation fails. D. The code runs with no output. E. An exception is thrown at runtime.
A. Just after line 13. B. Just after line 14. C. Never in this method. D. Just after line 15 (that is, as the method returns).