Solved

The Following Code Compiled, but While Running It the Program

Question 3

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

Related Questions