java - how can I exit an ijnterior loop of a nested loop -


I have this program, and I wonder how I can eliminate the internal loop of the nested loop. In particular, how can I return the interior loop (selection "T") and return it to the outside loop if the user does not choose to continue throwing the coin? I've snatched a small part of my code, but I do not know how I can return to the main loop.

  * {scanner other scanner = new scanner (System.in); Boolean user selection = false; String C; While (selection of users) {System.out.println ("" + "selection:"); If (the second scanner hasNext ("q | q")) {c = anotherScanner.next (); UsersSelection = True; System.out.println ("You have chosen to leave. If you want to resume, reboot the program."); break; } If (the second scanner hasNext ("t | T")) {c = anotherScanner.next (); UsersSelection = True; Scanners received = new scanner (System.in); System.out.println ("Please enter the number of coin flip"); Int numero = get.nextInt (); If (number> gt;) {for (int i = 0; i  

Pre> External: While (UsersSelection) {// blah blah}

then break; Replace with breakout; .

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -