I don't get this reference assignment. My ananlysis about line 5 is,a2 and a2 are one dimensinal arrays and a1 reference is also one dimensional array.so assignation is valid My analysis about line 6,a3,a3,a3 are one dimensional array and a2 reference is two dimensional array.i thought it would be invalid.but this one compiles fine .How?Please explain. My understanding about line 7,a3 is two-dimensional array and a2 reference is also two-dimensional array.so ithought it would valid.but this statement produce compilee error.Please explain [ September 18, 2006: Message edited by: Shiva Mohan ]
Originally posted by Shiva Mohan: Thanks for the reply Keith. In declaration of a3 is an three-dimensional array.Right? In the statement a3=a2;here a3 is two-dimensional array.How come a3 is one-dimensional.Please explain
a3 is "three-dimensional". a2 is "two-dimension". And a3 is one dimensional.
PS... I place the number of arrays in quotes, because technically, Java supports arrays of arrays -- not multidimensional arrays. (but for this debate, it's an okay interpretation.)