title: Scanner, useDelimiter
body: <p>I encounter some problem when using useDelimiter from the Scanner class.</p>
  
  <pre><code>Scanner sc = new Scanner(System.in).useDelimiter("-");
  while(sc.hasNext())
  {
      System.out.println(sc.next());
  }
  </code></pre>
  
  <p>if I have this input</p>
  
  <blockquote>
    <p>A-B-C</p>
  </blockquote>
  
  <p>the output will be</p>
  
  <blockquote>
    <p>A B</p>
  </blockquote>
  
  <p>and wait until I type in another "-" for it to print out the last character</p>
  
  <p>However if I instead of having user input data, and insert a String to the Scanner instead the code will work. What's the reason for it, and how do I fix it? I don't want to use StringTokenzier</p>