Solved

What Will Be Displayed When the Following Code Is Executed

Question 18

Multiple Choice

What will be displayed when the following code is 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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents