title: How can a derived class invoke private method of base class?
body: <pre><code>public class PrivateOverride {  
  
      private void f() {  
          System.out.println("private f()");  
      }
  }  
  
  public class Derived extends PrivateOverride {  
  
      public void f() {                         //this method is never run.
          System.out.println("public f()");     
      }  
  }  
  
  public static void main(String[] args) {
  
      // instantiate Derived and assign it to 
      // object po of type PrivateOverride.
      PrivateOverride po = new Derived();  
  
      // invoke method f of object po.  It
      // chooses to run the private method of PrivateOveride
      // instead of Derived
      po.f();                         
    }  
  }  
  </code></pre>
  
  <p>So, the output of this code  is <code>private f()</code>. Now, the question arises to my mind: how can <em>po</em> which is an object of <em>Derived</em> Class call a private method of <em>PrivateOverride</em> which is its base class?</p>