In Java, an array stores either primitive values (int, char, …) or references (a.k.a pointers) to objects.
When an object is created by using “new”, a memory space is allocated in the heap and a reference is returned. This is also true for arrays, since arrays are objects in Java.