a two dimensional array cannot be passed to a one dimensional array, it will not cast it, thought the integer primitives can be boxed to Integer then cast to implicitly to objects so if u change it like this it will go
Array in Java is an object. Having said that, the way that an array object is instantiated and accessed is different from to that of a conventional object. Opcodes for conventional objects and opcodes for array objects, are different.
Coming back to your question, I just get that sneaky feeling that your code would get compiled as the code itself doesn't cause any breach of conduct..!!