Which statement is true?

Given:
55. int [] x = {1, 2, 3, 4, 5};
56. int y[] = x;
57. System.out.println(y[2]);
Which statement is true?

Given:
55. int [] x = {1, 2, 3, 4, 5};
56. int y[] = x;
57. System.out.println(y[2]);
Which statement is true?

A.
Line 57 will print the value 2.

B.
Line 57 will print the value 3.

C.
Compilation will fail because of an error in line 56.

D.
Compilation will fail because of an error in line 55.



Leave a Reply 0

Your email address will not be published. Required fields are marked *