Hi new to java here,
Just a bit confused with while loops.
Can a while loop test against a boolean variable? All the examples I find on the net are always of < or > expressions. So how would we write the condition of the while loop.
If i wanted to lets say make a condition so that a boolean variable isEmpty is not equal to false that the while loop will keep continueing. Is it written as:
while(!isEmpty == false)
while(isEmpty != false)
I been trying this but I keep getting infinite loops and stuff I just would appreciate if anyone could explain this in laymans terms, also how would in the body of the while loops would be a practical way of ending the loop by changing isEmpty to true.
Thanks in advance.