Can you explain why this code
int[] test={0,0,0,0,0};
System.out.println(test);
prints something like [I@42e816 (perhaps memory address) but this code
Stack<Integer> stack = new Stack<Integer>();
stack.push(1);
stack.push(3);
stack.push(5);
stack.push(2);
stack.push(4);
System.out.println(stack);
prints "[1, 3, 5, 2, 4]"? What's the difference?
If Stacks derive from Vectors and Vectors from arrays, what's the cause of this different behavior?