title: Why can't I call a package-private method of another class that's a subclass of a class in the same package?
body: <p>I have a class <code>Base</code> in package A that defines the package-private method <code>foo()</code>.  In package B, I have a class <code>Impl</code> that extends <code>Base</code>.  In package A, if I try to call <code>foo()</code> on an instance of <code>Impl</code>, I get a compiler error.  (However, I can cast <code>Impl</code> to <code>Base</code> and then call it.)</p>
  
  <p>It seems reasonable that I should be able to call <code>foo()</code> from within the package, even if the object I'm calling it on is defined outside the package.  Is there a good reason that I can't?</p>