title: Java: How to call super().super() in overridden method (grandparent method)
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/586363/why-is-super-super-method-not-allowed-in-java">Why is super.super.method(); not allowed in Java?</a>  </p>
  </blockquote>
  
  
  
  <p>I have 3 classes they inherit from each other as follows:</p>
  
  <pre><code>A
   ↳
     B
      ↳
       C
  </code></pre>
  
  <p>Inside each class I have the following method: </p>
  
  <pre><code>protected void foo() {
      ...
  }
  </code></pre>
  
  <p>Inside class <code>C</code> I want to call <code>foo</code> from class <code>A</code> without calling <code>foo</code> in <code>B</code>:</p>
  
  <pre><code>protected void foo() {
      // This doesn't work, I get the following compile time error:
      // Constructor call must be the first statement in a constructor
      super().super().foo(); 
  }
  </code></pre>
  
  <p><strong>EDIT</strong><br>
  Some Context Info:<br>
  Class B is an actual class we use. Class C is a unit test class, it has some modifications. <code>foo</code> method inside <code>B</code> does some things we don't want so we override it inside <code>C</code>. However <code>foo</code> in class <code>A</code> is useful and needs to be called.</p>