A

Admin • 825.56K Points
Coach

Q. What is the output?
int[] x = {1,2,3};
System.out.println(x[1] + x[2]);

  • (A) 2
  • (B) 3
  • (C) 5
  • (D) 6

Explanation by: Admin
x[1] is 2 and x[2] is 3; 2 + 3 = 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.