title: Java Scanner Taking Extra Input
body: <p>I'm working on a <code>switch</code> statement that takes inputs with <code>Scanner</code>, and when I run in NetBeans, one of the inputs takes an extra blank input. The extra input happens at variable <code>dateAdmission</code> when the user is asked to input "Enter date of admission".</p>
  
  <pre><code>case "patient":
  {
      System.out.println("Enter name: ");
      String name = in.nextLine();
      System.out.println("Enter Address: ");
      String address = in.nextLine();
      System.out.println("Enter date of birth: ");
      String dob = in.nextLine();
      System.out.println("Enter MCP number: ");
      int mcp = in.nextInt();
      in.nextLine();
      System.out.println("Enter date of admission: ");
      String dateAdmission = in.nextLine();
      System.out.println();
      String hospital = in.nextLine();
      System.out.println("Enter name of doctor: ");
      String doctor = in.nextLine();
      System.out.println("Enter room number: ");
      int roomNum = in.nextInt();
      a[i] = new Patient(name, address, dob, mcp, dateAdmission, hospital, doctor, roomNum);
      break;
  }
  </code></pre>