title: Can the Java compiler do early binding for non-static methods?
body: <p>Let's say that I have the following class:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class MyClass {
      public void doSomething() {
          System.out.println("doing something.");
      }
  }
  </code></pre>
  
  <p>Let's further assume, that all my project does is to call that <code>.something()</code> method. No overriding or any other funny-business going on.</p>
  
  <pre class="lang-java prettyprint-override"><code>MyClass myObj = new MyClass();
  myObj.doSomething();
  </code></pre>
  
  <p>Does the <code>javac</code> compiler notice that this method call is not being overridden, and optimize the binding to "early binding"? I am asking out of curiosity; in any real-world application I would of course sprinkle <code>final</code>, <code>static</code>, and <code>private</code> all over my code.</p>