Solved

The Following Code Compiled, but While Running It the Program

Question 27

Essay

The following code compiled, but while running it the program appears to hang (e.g. nothing happens). This is a clear sign of an infinite loop. What part of this code fragment caused the infinite loop?
while(i < 50); {
System.out.println(i);
i+=2;
}

Correct Answer:

verifed

Verified

There is a misplace semi-colon...

View Answer

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