The code works fine.
Replace:
System.out.println(array);
With:
System.out.println(Arrays.toString(array));
Output:
[b, c, a] [b, c, a]
The String representation of an array displays the a “textual representation” of the array, obtained by Object.toString — which is the class name and the hash code of the array as a hexidecimal string.