title: Can't access protected method from child class
body: <p>So, we have </p>
  
  <pre><code>public abstract class A{
      protected abstract String f();
  }
  
  public class B extends A{
       protected String f(){...}
  }
  
  public class C extends A{
      protected String f(){
           A b = (A) Class.forName("B", true, getClass().getClassLoader()).newInstance();
           return b.f();
  }
  </code></pre>
  
  <p>This doesn't allow me to access <code>b.f()</code>, saying that <code>B.f()</code> is in the protected scope, however <code>f</code> was protected by <code>A</code>, and since <code>C</code> extends <code>A</code>, it should also get access to <code>f()</code>.</p>