S

Shivam • 8.86K Points
Tutor III

Q. What will be the output after compiling and running following code? 

Code:
1. public class Test{
2.       public static void main(String... args){
3.             int x =5;
4.             x *= 3 + 7;
5.             System.out.println(x);
6.       }
7. }
  • (A) 22
  • (B) 50
  • (C) 10
  • (D) Compilation fails with an error at line 4
  • Correct Answer - Option(B)
  • Views: 143
  • 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.

Be the first to start discuss.


Question analytics