Solved

Rewrite the Following Code Fragment Using a for Loop Instead

Question 23

Short Answer

Rewrite the following code fragment using a for loop instead of a while loop.
int i = 0;
while(i < 50) {
System.out.println(i);
i+=2;
}

Correct Answer:

verifed

Verified

for(int i = 0; i < 5...

View Answer

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

Related Questions