title: Java function overloading query
body: <p>A extends B</p>
  
  <pre><code>public class Test {
  
  public static void print(A obj) {
      System.out.println("print A");
  }
  
  public static void print(B obj) {
      System.out.println("print B");
  }
  
  public static void main(String [] args ) {  
      A x = new B();
  
      print(x);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Why it'll print "print A"? 
  Why function overloading doesn't look up the real type of x in runtime? </p>