title: How are primitive arrays implemented in java?
body: <p>There are several questions that are similar to this one here on S.O., but they don't quite answer what the code implementation is. I've looked at </p>
  
  <p><a href="https://stackoverflow.com/questions/8546500/why-isnt-there-a-java-lang-array-class-if-a-java-array-is-an-object-shouldnt">Why isn&#39;t there a java.lang.Array class? If a java array is an Object, shouldn&#39;t it extend Object?</a></p>
  
  <p>and </p>
  
  <p><a href="https://stackoverflow.com/questions/2267790/how-are-arrays-implemented-in-java">How are arrays implemented in java?</a></p>
  
  <p>and they don't answer what the concrete implementations are.</p>
  
  <p>I've downloaded the java source from <a href="http://hg.openjdk.java.net/" rel="nofollow noreferrer">OpenJDK</a>, and I really can't find what I'm looking for. (Perhaps that part of the code is proprietary?)</p>
  
  <ol>
  <li>How are append/inserts done?</li>
  <li>How is data retrieved? For example, if I invoke <code>my_arr[500]</code> what's the algorithm implemented to get the value at index 500?</li>
  <li>How are deletes done?</li>
  </ol>
  
  <p>Thanks in advance!</p>