title: Does an array object explicitly contain the indexes?
body: <p>Since day one of learning Java I've been told by various websites and many teachers that arrays are consecutive memory locations which can store the specified number of data all of the same type.</p>
  
  <p>Since an array is an object and object references are stored on the stack, and actual objects live in the heap, object references point to actual objects.</p>
  
  <p>But when I came across examples of how arrays are created in memory, they always show something like this:</p>
  
  <p>(In which a reference to an array object is stored on the stack and that reference points to the actual object in the heap, where there are also explicit indexes pointing to specific memory locations)</p>
  
  <p><a href="https://i.stack.imgur.com/DDMui.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/DDMui.jpg" alt="Internal working of objects taught by various websites and teachers"></a></p>
  
  <p>But recently I came across <a href="http://chortle.ccsu.edu/java5/Notes/chap49C/ch49C_4.html#array,_row_and_column_numbers" rel="noreferrer">online notes</a> of Java in which they stated that arrays' explicit indexes are not specified in the memory. The compiler just knows where to go by looking at the provided array index number during runtime.</p>
  
  <p>Just like this:</p>
  
  <p><a href="https://i.stack.imgur.com/K71DK.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/K71DK.jpg" alt="Enter image description here"></a></p>
  
  <p>After reading the notes, I also searched on Google regarding this matter, but the contents on this issue were either quite ambiguous or non-existent.</p>
  
  <p>I need more clarification on this matter. Are array object indexes explicitly shown in memory or not? If not, then how does Java manage the commands to go to a particular location in an array during runtime?</p>