title: How does Java compiler handle statically resolvable calls to non-static methods?
body: <p>Do java compilers (javac or eclipse) try to compile method calls as static when the target method is known statically (even if it's not a static method). Eg.</p>
  
  <pre>
  class A { 
      void foo() { doStuff(); }
  }
  ...
  A a = new A();
  a.foo(); // is this compiled as virtual call or static call?
  </pre>