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_2_Sample{ public static char[][] func1(char[][] x, char c){ System.out.println("func1"); c = 'f'; x[1][1] = c; x[1][2] = 'k'; char[][] x1 = {{}}; x = x1; char[][] x2 = {{'c', 'd', 'e'}}; return x2; } public static char func2(char[] a){ System.out.println("func2"); char c = 'g'; a[0] = c; return c; } public static void main(String[] args){ char c = 'w'; char[] a = {'c', 'a', 't'}; char[][] q = {{}, a, {'b', 'c'}}; char[][] d = q; d[1] = new char[3]; d[1][0] = 'd'; d[1][1] = 'o'; d[1][2] = 'g'; System.out.println(Arrays.toString(a)); System.out.println(c); System.out.println(Arrays.deepToString(q)); System.out.println(Arrays.deepToString(d)); q[2][1] = 'z'; System.out.println(Arrays.deepToString(q)); System.out.println(Arrays.deepToString(d)); q = func1(d, c); System.out.println(Arrays.toString(a)); System.out.println(c); System.out.println(Arrays.deepToString(q)); System.out.println(Arrays.deepToString(d)); func2(q[0]); System.out.println(Arrays.toString(a)); System.out.println(c); System.out.println(Arrays.deepToString(q)); System.out.println(Arrays.deepToString(d)); } }