Solved

What Will Be Displayed After the Following Statements Are Executed

Question 36

Multiple Choice

What will be displayed after the following statements are executed?
int y = 10;
If (y == 10)
{
Int x = 30;
X += y;
System.out.println(x) ;
}


A) 40
B) 30
C) 20
D) The code contains an error and will not compile.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions