title: Java runtime polymorphism not working with different parameter types
body: <p>I have 3 different class, </p>
  
  <pre><code>public class Parent {
      public void add(double a, double b) {
          System.out.println("Parent class add(double double)");
      }
  
  public class Child extends Parent {
      public void add(long a, long b) {
          System.out.println("Child class add(long long)");
      }
  }
  
  public class Test {
      public static void main(String arr[]) {
          Parent parent = new Child();
          parent.add((long)System.currentTimeMillis(), (long)System.currentTimeMillis());
      }
  }
  </code></pre>
  
  <p>The output should be <strong>Child class add(long long)</strong>, but instead of this, 
  it is showing <strong>Parent class add(double double)</strong></p>
  
  <p>But when I am adding child's class's add method in parent class, it is 
  showing correct output. Can anyone please tell me the reason. </p>