int i = 0, j = 1; if ((i++ == 1) && (j++ == 2)) { i = 42; } System.out.println(“i = “ + i + “, j = “ + j); What is the result?()
A. i = 1, j = 2 B. i = 1, j = 1 C. i = 42, j = 2 D. i = 42, j = 1 E. Compilation fails.
public class Alpha{ public static void main( string[] args ){ if ( args.length == 2 ) { if ( args.[0].equalsIgnoreCase(“-b”) ) System.out.println( new Boolean( args[1] )); } } } And the code is invoked by using the command: java Alpha –b TRUE What is the result?()
A. true B. null C. false D. Compilation fails. E. The code runs with no output. F. An exception is thrown at runtime.
public class Alpha{ private static Character() ids; public static void main( String[] args){ ids = new Character[args.length]; for (int i=0; iids[i] = new Character( args[i] ); System.out.print( ids[i] ); } } } What is correct?()
A. Compilation fails. B. The code runs with no output. C. An exception is thrown at runtime. D. The code runs, outputing a concatenated list of the arguments passed to the program.