java restart while loop

Solutions on MaxInterview for java restart while loop by the best coders in the world

showing results for - "java restart while loop"
Simon
26 Sep 2020
1//use continue keyword
2
3while (true) {
4  //do stuff
5  if (condition) continue; //goes to the top of while loop
6  //do other stuff
7}