Question: a) What is wrong with the following statement? Explain. int[] a; a[0] = 5; (b) Suppose that the variables a and b are references to
a) What is wrong with the following statement? Explain. int[] a; a[0] = 5;
(b) Suppose that the variables a and b are references to arrays of integers. What is the value of b[0] and b[1] after the following statements have been executed? Explain why. a[0] = 1; b[0] = 2; b = a; b[1] = 3; a[1] = 4;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
