Question: Given the method below, public static void myQ8(String x) { boolean done = false; int i=7; String name = x; while (!done) { try {

Given the method below, public static void myQ8(String x) { boolean done = false; int i=7; String name = x; while (!done) { try { char c = name.charAt(i); i=i-2; System.out.print("n="+c); done true; } catch (IndexOutOfBoundsException exception) { System.out.print("E"); done=true; } i++; } System.out.print("W"+i); } = what is printed after calling myQ8("Test2"); a. W7 b. EW8 C. In E BlockWelcome 6 d. EW7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
