title: How to fix my do while loop in order to have the menu appear again and again until the user presses Letter 'Q'?
body: <p>Here's my code:</p>
  
  <pre class="lang-java prettyprint-override"><code>import java.util.Scanner;
  // I want to call the menu function in my driver class and in a do while loop . 
  
  public class Driver {
  
      public static void main(String[] args) {
  
          do {
              Scanner scanner = new Scanner(System.in);
  
              char choice = scanner.next().charAt(0);
  
          } while (choice == 'Q');// How to exit the menue
  
      }
  
      static void createNewEmployee() {
          System.out.println("What is the name of employee?");
  
      }
  
      static void process() {
          char choice;
          switch (choice) {
  
          case 'N':
              System.out.println("new employee");
              createNewEmployee();
              break;
          case 'P':
              System.out.println("Compute paychecks");
              break;
          case 'R':
              System.out.println("Raise Wages ");
              break;
          case 'L':
              System.out.println("List Employees ");
              break;
          default:
              System.out.println("Error");
  
          }
      }
  
  }
  </code></pre>