Question: int var 1 = 5 , var 2 = 6 ; if ( ( var 2 = 1 ) = = var 1 ) System.out.print

int var1=5, var2=6;
if ((var2=1)== var1)
System.out.print(var2);
else
System.out.print(++var2);
What is printed by the code above?
Question 7 options:
1
2
3
4
Nothing, Code does not compile.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!