title: Why is the protected method not visible?
body: <p>Java experts, I would sincerely appreciate any insights!</p>
  
  <p>I have an abstract class in a package with a protected method. I also have a subclass of this class in the same package. Now, when I try to instantiate the subclass from a class outside the package, and invoke the protected method on the subclass' instance, Eclipse is complaining the protected method is not visible. </p>
  
  <p>I thought, protected methods will be visible to all children - in or out of the package - as long as the class visibility does not restrict it - in this case, both the parent and the child class are public. What am I missing? Thanks in advance!</p>
  
  <pre><code>package X;
  public abstract class Transformation {
    protected OutputSet genOutputSet (List list) {
      ..
    }
  }
  </code></pre>
  
  <p><br></p>
  
  <pre><code>package X;
  public class LookupTransformation extends Transformation {
  }
  </code></pre>
  
  <p><br></p>
  
  <pre><code>package Y;
  import X.*;
  public class Test {
    public static void main(String[] args) {
      List&lt;field&gt; fld_list = new ArrayList();
      ..
      LookupTransformation lkpCDC = new LookupTransformation();
      OutputSet o = lkpCDC.genOutputSet(fld_list); // Eclipse errors out here saying genOutputSet from the Type Transformation is not visible. WWWWWWWWHHHHHAAAATTTTTT????
    }
  }
  </code></pre>
  
  <p><br></p>