I\'m doing a project with basic Java for a CS class. The project has a for loop nested inside a while loop.
I am not allowed to use break as a wa
break
You can early-terminate a for loop like this
for (int i = 0; i < SOMELIMIT && (!found); ++i) {...}