import java.util.Arrays; /* Trace throught the following code by hand, and record what it prints out. To check your answers, compile and run the file. */ public class Assess5_3_Sample{ public static int k = 5; public static boolean func1(int[] x, int y){ System.out.println("dog"); int k = 1; y = y - 1; int [] c = {y}; x = c; k++; return true; } public static int[] func2(int[] a, int b){ a[1] = 2; b = b + 3; k = k + 3; System.out.println(b + 4); int [] x = {5, 1}; int [] c = {b, 2}; a = c; return a; } public static void main(String[] args){ int b = 5; int [] x = {b, 2}; int [] q = {7, 2}; int [][] z = {q, {x[1]}, {5}}; q = func2(x, b); System.out.println(Arrays.toString(q)); System.out.println(b); System.out.println(Arrays.toString(x)); System.out.println(Arrays.deepToString(z)); int [] c = {b, 5}; x = c; func1(x, q[1]); System.out.println(Arrays.toString(q)); System.out.println(func1(x, q[0])); System.out.println(k); int k = 2; k++; System.out.println(k); func1(q, k); } }