title: Java Scanner trouble
body: <p>Recently I started learning Java. Probably this is a stupid question: using 'p' character as delimiter for my Scanner I expect the output will be</p>
  
  <p><strong>42</strong> </p>
  
  <p><strong>17</strong></p>
  
  <p><strong>Hello World</strong></p>
  
  <p>while it is</p>
  
  <p><strong>42</strong></p>
  
  <p><strong>17</strong></p>
  
  <p><strong>pHello World</strong></p>
  
  <p>Delimiter may be excluded from the tokens of the Scanner, so why also 'p' char is printed in the last line?</p>
  
  <p>'''</p>
  
  <pre><code>public static void main(String[] args) {
      String s = "42p17pHello World";
      Scanner scan = new Scanner(s);
      scan.useDelimiter("p");
      System.out.println(scan.nextInt());
      System.out.println(scan.nextInt());
      System.out.println(scan.nextLine());
      scan.close();
  }
  </code></pre>
  
  <p>'''</p>