A

Admin • 828.03K Points
Coach

Q. What is the output of the following code?

Code:
int x = 10;
System.out.println(x++);
  • (A) 10
  • (B) 11
  • (C) Compiler error
  • (D) Undefined
  • Correct Answer - Option(A)
  • Views: 15
  • Filed under category Java
  • Hashtags:

Explanation by: Admin
The value of x is printed before it is incremented.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.