title: What does it mean to say the keyword "private" is private at the class level?
body: <p>A source I am reading says that the keyword <code>private</code> means a method or variable is private at the class level, not the object level.</p>
  
  <p>Meaning in a chunk of code like this:</p>
  
  <pre><code>public class Weight2 implements Comparable&lt;Weight2&gt;
  {
     private int myPounds, myOunces;
  
     public Weight2()
     {
        myPounds = myOunces = 0;
     }
     public Weight2(int x, int y)
     {
        myPounds = x;
        myOunces = y; 
     }
  
     public int compareTo(Weight2 w)
     {
        if(myPounds&lt;w.myPounds)
           return -1;
        if(myPounds&gt;w.myPounds)
           return 1;
        if(myOunces&lt;w.myOunces)
           return -1;
        if(myOunces&gt;w.myOunces)
           return 1;
        return 0;
     }
  }
  </code></pre>
  
  <p>A Weight2 object can access the private fields of a different weight2 object without an accessor method... but rather by just saying <code>w.myPounds</code>.</p>
  
  <p>CLARIFICATION:</p>
  
  <p>I want to know from where objects can access <em>a different object's</em> private data. Is it only from within the class? Or could this be done from a driver program?</p>