Any inherit method to traverse a multidimensional array?
Just after this tutorial, I was wondering what would happen if I try to traverse a 2D array, say: int[][] arr = new int[3][2]; // Some codes to assign values to the array for (int i[]: arr) { System.out.println(i); } Although Eclipse did not return any error, the display returns 3 lines of strange symbols, each was like “[D@15db9742”. I understand that I can and I managed to “manually” traverse the elements in an order that I wish using nested loops without problem, but I am just wondering if any default syntax can actually traverse a multidimensional array (with user-defined sorting order, if possible). If the above code actually can traverse a multidimensional array, what went wrong such that those strange symbols showed up? Thanks!