title: Java: why a constructor has access modifier?
body: <p>For example a class:</p>
  
  <pre><code>//class1
  class A {
      private A() {  } // why would I make it private?
      public A(int) {  } //why isn't it implicitly public?
  }
  //class2
  class B {
  
      public static void main(String[] args) {
          //A a = new A();
      }
  }
  </code></pre>
  
  <p>A constructor instantiates a class so why it has the access modifier? 
  Is there a case when we have to declare a constructor <em>private</em>?</p>