A. 16>4 B. 16/2 C. 16*4 D. 16>>2 E. 16/2^2 F. 16>>>2
public class X { public static void main (Stringargs) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()
A.The program runs and prints “Hello” B.An error causes compilation to fail. C.The program runs and prints “Hello world!” D.The program runs but aborts with an exception.
public class Foo { public static void main (String args) { int i = 1; int j = i++; if ((i>++j) && (i++ ==j)) { i +=j; } } } What is the final value of i?()
A. 1 B. 2 C. 3 D. 4 E. 5