What is wrong with the following code fragment? What are three distinct ways it could be changed to remove the flaw?
```
count = 50;
while (count >= 0)
{
System.out.println(count);
count = count + 1;
}
```
The loop is infinite because count initially is greater than zero, and continues to increase in value. The flaw can be removed by (1) decrementing rather than incrementing count, (2) initializing count to 0 and using, as the condition of the while loop, count <= 50, and (3) picking an upper limit and using, as the condition of the while loop, count <= upperLimit.
You might also like to view...
Select the syntactically correct way to access a Public Shared class member.
a) className(sharedMemberName) b) sharedMemberName.className c) className.sharedMemberName d) sharedMemberName(className)
Everything Linux does is considered a process.
Answer the following statement true (T) or false (F)