title: Why is it that I can declare a numerical variable as a double but still use .nextInt()?
body: <p>Okay, I'm new to coding so I am unfamiliar with everything. Here's my question:</p>
  
  <p>Why is it that .nextInt(); will process a double even though the name is .nextInt();?</p>
  
  <pre><code>double max = scan.nextInt();
  </code></pre>
  
  <p>This works, but why?</p>