With the following line of code:
System.out.println(Arrays.toString(ar));
My output is like this:
[2, 4, 6, 8, 8]
And when I simply print out the array:
System.out.println(ar);
My output is:
[I@78f1f2cc
How do I print out 2 4 6 8 8
without using a for
loop?