On the Sun self-assessment for 310-055 there is a question as follows:
Given:
int[] a = {7,9,8};
int[][] aa = {{1,2,3},{6,5,4}};
int[][][] aaa = {{{1,2},{3,4}},{{5,6},{7,8}}};
which will compile?
a. System.out.println(Arrays.deepToString(a));
b. System.out.println(Arrays.deepToString(aa));
c. System.out.println(Arrays.deepToString(aaa));
Now the signature for deepToString() is
So I can see why b & c would compile: they are arrays of arrays, that is, arrays of objects. Is that the reason (a) will not compile, that it is an array of primitives? Am I missing anything here?
I see here
https://coderanch.com/t/268592/java-programmer-SCJP/certification/todeepArray that Bert says this is not on the exam but I'm not taking any chances.