title: Why there isn't a dynamic binding in the method arguments in Java?
body: <p>I am wondering why there isn't a dynamic binding in Java in method arguments? Example:</p>
  
  <pre><code>static class C {
     public static void test(C c) {
        System.out.println("C");
      }
  }
  
  static class D extends C {
     public static void test(D d) {
        System.out.println("D");
      }       
  }
  
  public static void main(String[] args) {
          C c = new D();
          D d = new D();
          test(c);
  </code></pre>
  
  <p>It has to be anyway determined, whether variable c contains the instance of class C or the instance of its subclass, so why can't it be done dynamically?</p>