P

Pooja • 4.41K Points
Extraordinary

Q. With x = 0, which of the following are legal lines of Java code for changing the value of x to 1?
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;

  • (A) 1, 2 & 3
  • (B) 1 & 4
  • (C) 1, 2, 3 & 4
  • (D) 3 & 2
  • Correct Answer - Option(C)
  • Views: 29
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics