title: Are instance variables passed by reference in Java?
body: <p>Now I know that Java is purely passed-by-value, but are instance variables passed by reference?</p>
  
  <p>Here's what I mean (and I know this code is terrible, but it's pseudo-code:</p>
  
  <pre><code>//Instance variables
  private Object[] array = new Object[10];
  array[4] = new Object[5];
  
  //Private method
  private Object ar(int x)
  {
       return array[x];
  }
  
  //Inside Main or some other method
  ar(4)[0] = "Foo";
  </code></pre>
  
  <p>Now, would the first slot on the array in <code>array[4]</code> be changed to "Foo" because <code>array</code> is an instance variable?</p>
  
  <h2>To Clarify:</h2>
  
  <p>I know that <strong><em>EVERYTHING</em></strong> is passed by value. But we are talking about calling things contained in instance variables, please focus on that. Thanks.</p>