title: Why can an instance of a class access private fields of another instance of its own type?
body: <p>An instance of a class, in Java, can access private fields of a different instance of its own type, such as in the following listing:</p>
  
  <pre><code>public class Foo {
    private int secret;
    public void bar(final Foo foo) {
      foo.secret = 100;
    }
  }
  </code></pre>
  
  <p>What would be the argument for such semantics (when designing a language)?</p>