Multiple Choice
What will be printed when the following code is executed? int y = 10;
If ( y == 10)
{
Int x = 30;
X += y;
}
System.out.print("x = ") ;
System.out.print(x) ;
A) x = 30
B) x = 40
C) x = 20
D) x is unknown when the last statement is executed
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q6: In Java, when a character is stored
Q8: What does the following code display? <br>double
Q24: The expression tested by an if statement
Q25: What would be the value of discountRate
Q28: Because the && operator performs short-circuit evaluation,your
Q31: Enclosing a group of statements inside a
Q32: What would be the value of x
Q38: What is the value of x after
Q50: What would be the value of bonus
Q64: An important style rule you should follow