Given: public class Test -[ public static void main(String[] args) { boolean a = new Boolean(Boolean.valueOf (args[0])); boolean b = new Boolean(args[1]); System.out.println(a + " " + b); } } And given the commands: javac Test.java java Test TRUE null…

Given the following code: public static void main(String(] args) { String[] planets = {"Mercury", "Venus", "Earth", "Mars"}; System.out.println(planets.length); System.out.println(planets[1].length() ); What is the output A. 4 21 B. 5 4 C. 3 5 D. 4 4 E. 4 7 F.…

Given: public class Vowel { private char var; public static void main(String[] args) { char var1 = 1 a 1 ; char var2 = varl; var2 = 1 e 1 ; Vowel obj1 = new Vowel (); Vowel obj2 =…

Given: public class MyField { int x; int y; public void doStuff(int x, int y) { this.x = x; y = this.y; > public void display () { System.out.print(x + " " + y + " : "); } public…

Given the code fragment: public static void main(String[] args) { try { int num = 10; int div = 0; int ans = nim / div; } catch (ArithmeticExeption ae) { ans = 0 // line nl } catch (Exception…

Given: class Caller { private void init () { System.out.println("Initialized"); } private void start () { init(]; System.out.println("Started") ; } public class TestCall { public static void main(String[] args) { Caller c – new Caller(); c.start (); c.init(); } }…

Given the code fragment: int n [] [] = {{1, 3}, {2, 3}}; for (int i = n.length-1; i >= 0; i—) { for (int y : n[i]) { System.out.print (y) ; } } What is the result? A. 1324…

Given: public class MyClass { public static void main(String[] args) { String s = ”’Java Duke"; int len = s . trim (). length () ; System.out.print(len); } } What is the result? A. Compilation fails B. 11 C. 8…