array is a special kind of object, it does not have an implicit toString() , which controls the pretty printed printing of the contents of the array, which happens when the object is represented by the standard representation for objects that are its hash code.
You should use Arrays.toString() :
for (int i = 0; i < array.length; ++i) System.out.println(Arrays.toString(array[i]));
Remember that you cannot write Arrays.toString(array) directly, because, as stated in the documentation:
If the array contains other arrays as elements, they are converted to strings by the Object.toString () method, inherited from Object, which describes their identifiers, and not their contents.
source share