title: the relationship between object and class in java
body: <p>Alpha.java</p>
  
  <pre><code>class Alpha {
    private void iamprivate() {
      System.out.println("iamprivate");
    }
  }
  </code></pre>
  
  <p>Beta.java</p>
  
  <pre><code>class Beta {
    void accessMethod() {
      Alpha a = new Alpha();
      a.iamprivate();     // illegal
    }
  }
  </code></pre>
  
  <p>A instance of class Alpha should have all the variables and methods of the class.</p>
  
  <p>But, why can not we invoke all the object's methods?
  Just because some methods are private?</p>
  
  <p>It looks like instances of class don't have the class's private members outside the definition of the class.</p>
  
  <p>Sorry, I am totally beginner. The question may be silly.</p>