title: java.util.Scanner's useDelimiter(" ") or useDelimiter(Pattern.compile("\\s")) work different than standard behaviour
body: <p>Given the code below, it outputs:</p>
  
  <pre><code>Feed a chunk of data here:           
  I have found:   0 words; 0 ints; 0 booleans;
  </code></pre>
  
  <p>if I type 10 spaces and leave the two useDelimiter method invokations commented, and outputs:</p>
  
  <pre><code>Feed a chunk of data here:           
  I have found:   9 words; 0 ints; 0 booleans;
  sssssssss
  </code></pre>
  
  <p>if I type the very same 10 spaces but do use one of the two useDelimiter invocations.
  Why is it like this? Shouldn't be the same? Here is the code, thank you:</p>
  
  <pre><code>package com.riccardofinazzi.regex;
  
  import java.io.Console;
  import java.util.Scanner;
  import java.util.regex.Pattern;
  import java.util.ArrayList;
  
  class ScanNext {
      public static void main(String[] args) {
  
          /* match counters */
          int hits_s = 0, hits_i = 0, hits_b = 0;
  
          /* current token value */
          String  s;
          Integer i;
          Boolean b;
  
          ArrayList&lt;Object&gt; al = new ArrayList&lt;Object&gt;();
  
          Scanner s1 = new Scanner(System.console().readLine("Feed a chunk of data here: "));
  
          /* not needed as this is def behaviour, I put it here to not forget the method */
  
          //s1.useDelimiter(Pattern.compile("\\s"));
          //s1.useDelimiter(" ");
  
          while(s1.hasNext()) {
              if (        s1.hasNextInt()) {
                          al.add(s1.nextInt());       hits_i++;
  
              } else if ( s1.hasNextBoolean()) {
                          al.add(s1.nextBoolean());   hits_b++;
  
              } else {    al.add(s1.next());          hits_s++;
              }
          }
  
          System.out.println("I have found:\t"+hits_s+" words; "+hits_i+" ints; "+hits_b+" booleans;");
  
          for (Object in : al) {
              if (in instanceof String)
                  System.out.print("s");
              if (in instanceof Integer)
                  System.out.print("i");
              if (in instanceof Boolean)
                  System.out.print("b");
          }
          System.out.print("\n");
      }
  }
  </code></pre>