I\'m looking to keep the following menu repeating:
Choose an Option
1 - FIND
2 - IN-SHUFFLE
3 - OUT-SHUFFLE
The selected option stays the same throughout the loop. You need to set quitto true for the loop to exit.
I suggest adding an option to quit to the switch statement, where you do just that.
To be able to change the selected option, you need to ask for input inside the loop.
Scanner sc = new Scanner(System.in);
int choice;
boolean quit = false;
do {
choice = sc.nextInt();
switch (choice) {
case 1:
// case 1
break;
case 2:
// case 2
break;
case 3:
// case 3
break;
case 4:
quit = true;
break;
default:
// your default here
}
} while (!quit);