I do no understand why anybody would use
while(true) {
//do something
}
instead of
boolean condition = true;
while(condition == true) {
//do something
}
The latter is super easy to understand, whilst the former is not.
So, what condition does while(true) check? When is while(true) true, and when is it false?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…