Using Arrays.toString method on Multi-dimensional arrays in Java!

Revision en1, by safakozdek, 2017-01-23 09:57:47

Hello,

I would like to know about the meaning of the output that i get when i tried Arrays.toString method on a multi dimensional array. I know that we use Arrays.deepToString for displaying multidimensional arrays in Java.

However the output looked very strange to me. What does that thing starting with "[" refers to ? Is it something like the place that arrays stored in memory? (btw I use Eclipse)

Thanks.

Source Code:

public static void main (String args[]) {

int arr[][] = {{1,2,3,4,5},{1},{1}};

System.out.println(Arrays.toString(arr));

}

Output:

[[I@4554617c, [I@74a14482, [I@1540e19d]

Tags #java, array, display, eclipse

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English safakozdek 2017-01-23 09:57:47 694 Initial revision (published)