I have been stuck at this for sometime and was wondering if anyone would be able to guide me. 
I am trying to let the user enter in a character and if it does not match one of the switch cases, then it should continue to ask the user. My code does that part fine. The issue comes up when the user tries to enter a correct character after and my code continues to output the default instead of the specific case.
Any help would be appreciated!
Thank you

```
 while(!flag){
            switch (endChar) {
                case 'T':
                case 't':
                    modFlags[0] = true;
                    flag = true;
                    break;
            case 'P':
            case 'p':
                modFlags[1] = true;
                flag = true;
                break;

            case 'W':
            case 'w':
                modFlags[2] = true;
                flag = true;
                break;

            case 'L':
            case 'l':
                modFlags[3] = true;
                flag = true;
                break;

            case 'I':
                System.out.print("sd");
                fileName = updateFileName(sc, fileName);
                flag = true;
                break;
            case 'i':
                fileName = updateFileName(sc, fileName);
                flag = true;
                break;

            case 'O':
            case 'o':
                break;

            case 'D':
            case 'd':
                break;

            case 'M':
            case 'm':
                modeBoth = true;
                flag = true;
                break;

            case 'H':
            case 'h':
                showMenu = false;
                flag = true;
                break;

            default:
                System.out.println("Unknown Option.");
                System.out.print("Enter action: ");
                sc.next();
                break;
               // flag = false;
        }

    }

```