1. Tracing Programs For each program below, show what is displayed on the screen when the code executes. A. import java.util.Arrays; public class ReferenceSemantics { public static int mystery(int a, int [] b) { a++; b[0] = 0; b = new int[4]; return a / 2; } public static void main(String [] args) { int x = 10; int [] y = {3, -3, 3}; x = x + mystery(x, y); System.out.println(x); System.out.println(Arrays.toString(y)); } } B. public class NestedCalls { public static int mystery1(int a) { System.out.println(\"m 1\"); return a / 2; } public static String mystery2(int b) { String s = \"m 2\"; System.out.println(s); for(int i=0; i Solution 1 A) Output: 15 [0, -3, 3] First output reason: x = x + mystery(x, y); In above statement x is 10 mystery will return 5 (i.e., 11/2). So result is 15. Second output reason: int [] y = {3, -3, 3}; System.out.println(Arrays.toString(y)); Inside the function mystery we have a statement b[0] = 0; So y[0] becomes 0 and rest values are not changed and displayed. 1 B) Output: main m 1 m 2 m 2 0 1 end main 1st output reason: main because: System.out.println(\"main\"); 2nd output reason: m 1 because: System.out.println(mystery2(mystery1(4))); First mystery1(4) within the function we have System.out.println(\"m 1\"); 3rd output reason: m 2 0 1 because return a / 2; will return 2. now it is mystery2(2) inside the function we have String s = \"m 2\"; System.out.println(s); after this we have for(int i=0; i.