title: Access to a protected constructor in Java
body: <p>If I have a class A and its subclass B.</p>
  
  <pre><code>package washington;
  public class A{
         protected A(){}
  }
  
  package washington;
  public class B extends A{
        public B(){super();} // it works
        public static void main (String[] args){
        A b = new A(); // it does work.
         }
  }
  </code></pre>
  
  <p>The class A has a protected constructor, but I cannot access the constructor in B. I think it is a rule, however, I cannot find a webpage describing this situation.. All that I saw mention <code>protected</code> can be accessed from subclass, same-package.... e.t.c.</p>
  
  <pre><code>package california;
  public class A extends washington.A{
      public static void main (String[] args){
         new washington.A(); // it does not work.
      }
  }
  </code></pre>
  
  <p>I wonder if this is because I use IntelliJ IDEA 2017.3.4.. compiler is javac 9.0.4</p>