Мой оператор switch просто зацикливается. Следует напечатать выбранный вами вариант, а затем перепечатать меню. Пожалуйста помоги!
Вот мой код:
menu ="\n\t1 Create Account" +
"\n\t2 Check balance" +
"\n\t3 Withdraw" +
"\n\t1 Deposit" +
"\n\t2 Get account ID" +
"\n\t3 Set ID" +
"\n\t1 Display Account Info" +
"\n\t0 Quit\n\n\n";
System.out.println(menu);
System.out.println("\tEnter your selection: ");
option = scan.nextInt();
while (option != 0) {
switch (option) {
case 1: // Enter and Validate SSN
System.out.print("option 1");
break;
case 2: //Enter and Validate Passwords
System.out.print("option 2");
break;
case 3: //Enter,Verify, and Translate a Phone keypad Number
System.out.print("option 3");
break;
case 4: // Enter and Validate SSN
System.out.print("option 4");
break;
case 5: //Enter and Validate Passwords
System.out.print("option 5");
break;
case 6: //Enter,Verify, and Translate a Phone keypad Number
System.out.print("option 6");
break;
case 7: //Enter,Verify, and Translate a Phone keypad Number
System.out.print("option 7");
break;
default: outputString = "\nInvalid Selection\n";
System.out.println(outputString);
break;
}
}