title: Is there a way to make an array truly private in Java?
body: <p>If I do something like</p>
  
  <pre><code>private int[] myPrivateArray;
  </code></pre>
  
  <p>and have a getter that returns the array, then the array contents can be modified from outside the class, which sort of defeats the purpose of making it private.</p>