Can anyone explain the output that I am getting while compiling this program?
java
Solution
Java arrays have a `toString()` method that simply display the type of the array (`[I`), followed by an `@`, followed by the hash code of the array (`7a67f797`). This value is almost meaningless. And `toString()` is the method called on every object passed to `System.out.println()`.
If you want to see the contents of the array, then use `java.util.Arrays.toString(array)`.
Problem
I executed the below mentioned code, when I got a strange output. Can anyone please explain why I am getting this output ? Code: ``` public class Bar { static void foo( int... x ) { System.out.println(x); } static void foo2( float... x ) { System.out.println(x); } public static void main(String args[]) { Bar.foo(3,3,3,0); Bar.foo2(3,3,3,1); Bar.foo(0); } } ``` Output ``` [I@7a67f797 [F@3fb01949 [I@424c2849 ``` Why are we getting the `"[I@"`/`"[F@"` prefixes and the 8 alphanumeric characters to follow, are they memory address ?