81.5k views
2 votes
Something within a while loop must eventually cause the condition to become false, or a(n) __________ results.

A. null value
B. unexpected exit
C. infinite loop
D. compiler error

User Srjjio
by
6.3k points

1 Answer

3 votes

Answer:

C. infinite loop

Step-by-step explanation:

If we cannot make a false condition in a while cycle, the cycle will be infinite, because the condition always is true and making the operation infinitely.

For example:

// we declarate our vairable = 0

int i = 0;

// we make the while cycle = true

while (true) {

// we increment our variable

i++;

// we print our variable

System.out.println ("Valor de i: " + i);

// If we are not make this condition, the cycle will be infinte

if (i==9) {

break;

}

}