how to exit a while loop and restart later java code example
Example: java restart while loop
//use continue keyword
while (true) {
//do stuff
if (condition) continue; //goes to the top of while loop
//do other stuff
}
//use continue keyword
while (true) {
//do stuff
if (condition) continue; //goes to the top of while loop
//do other stuff
}