title: How to use overloaded method (distinguish int or double)
body: <p>I need to write a program that gets three numbers from the user, then passes those to an overloaded method (I have a <code>double</code> and <code>int</code>).</p>
  
  <p>My question is how do I determine if it's an <code>int</code> or a <code>double</code>? </p>
  
  <p>To get input I'm doing this:</p>
  
  <pre><code>Scanner input = new Scanner( System.in );
  double number1 = input.nextDouble(); // read first double
  double number2 = input.nextDouble(); // read second double
  double number3 = input.nextDouble(); // read third double
  
  MyMathOps MyMathOps = new  MyMathOps();
  double result = MyMathOps.maximum( number1, number2, number3 ); 
  System.out.println(result);
  </code></pre>
  
  <p>But what if they enter an <code>int</code>? I want to be able to determine this, and pass it to the <code>int</code> <code>maximum</code> method.</p>