A

Admin • 828.03K Points
Coach

Q. What is printed?
System.out.println("abc" + 1 + 2);

  • (A) abc12
  • (B) abc3
  • (C) 3abc
  • (D) Compilation error

Explanation by: Admin
String concatenation is left to right, so it's "abc" + 1 = abc1, then abc1 + 2 = abc12.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.