title: Why ScannerObj.hasNextInt() require to enter input?
body: <p>Hi I am really confused!
  From the below code, you can see that the obj.NextInt() asks for input and also
  obj.hasNextInt() requires to enter input.</p>
  
  <pre><code>Scanner obj=new Scanner(System.in);
  bool x = obj.hasNextInt();
  out.print(x);
  </code></pre>
  
  <p>it requires to enter an input. why?</p>