When you assign an array to a previously declared array reference, the array you're assigning must be the same dimension as the reference you're assigning it to. ...
Then these line are wrong? .........
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 26710
posted
0
The bit about two-d is wrong. There is no such thing as a 2-D array in Java. Look at the Java™ Tutorials, where it says it's an array of arrays.
A reference must be declared and assigned the same type. An int[] is different from an int[][], but both count as objects. And an int isn't an object. You can assign squeegees[0] to blots (or vice versa) because they are both the same type, vizint[]. Both are however null in the code you quoted.