You could wrap the loop in an if clause:
if (condition) while (true) {
// ...
} else {
// ...
}
You could wrap the loop in an if clause:
if (condition) while (true) {
// ...
} else {
// ...
}