all that calling System.out.print on an object will do is print the
toString() method of the object.
The default behaviour of toString() (from Object) is to give you the
handle of the object.
What you are seeing is the handle (or pointer except that java doesn't
have pointers) to
the memory that the array occupies. When you give it a[0] it is showing
an int and the default
is to print those directly - which means you get the value output.