title: How to get a whole line of input using scanner
body: <p>I know a lot of people have asked this but everyones answer is to use <code>scanner.nextLine()</code> however this does not work for me. I have this code:</p>
  
  <pre><code>if (option == 1) {
      System.out.println("What is the name of the goal the task is  under?: ");
      String goalName = scanner.next();
  }
  </code></pre>
  
  <p>When I use <code>.next()</code> I can only get one word, however when I use <code>.nextLine()</code> the command line does not allow for the user to input anything so it asks <em>"What is the name of the goal the task is under?:"</em> and then continues on the program without letting input occur. </p>