About Question enthuware.ocpjp.v7.2.1736 :
Posted: Sat Jun 13, 2015 1:13 am
if I change the declaration as:it produce output as:Code: Select all
int a = 10; Integer[] aa = { 10, 20 }; long l = 30; probe(a); probe(aa); probe(l);
In Integer
In Integer..
In Long
but my question is why probe(aa) print: In Integer..
while it can also print: In Object
asdeclaration becauseCode: Select all
int[]aa = {10, 20}
"aa" is also object.Code: Select all
Integer[]aa