What output will be produced by the following code? char[] a = new char[3]; for (int i = 0; i c[i] = 'a'; char[] b = a; System.out.println("a[1] = " + a[1] + ", b[1] = " + b[1]);...



What output will be produced by the following code?


char[] a = new char[3];


for (int i = 0; i



c[i] = 'a';


char[] b = a;


System.out.println("a[1] = " + a[1] + ", b[1] = " + b[1]);


System.out.println("a[2] = " + a[2] + ", b[2] = " + b[2]);


b[2] = 'b';


System.out.println("a[1] = " + a[1] + ", b[1] = " + b[1]);


System.out.println("a[2] = " + a[2] + ", b[2] = " + b[2]);



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here