Alan Stange wrote:
> Oliver Jowett wrote:
>
>> Ken Geis wrote:
>>
>>> byte[][] answer = new byte[l_nf][0];
>>> to
>>> byte[][] answer = new byte[l_nf][];
>>
>> Gah?! What JVM? Aren't the two forms equivalent?
>
> No. They aren't.
>
> The first is l_nf+1 objects being created (and array of byte[] with l_nf
> byte[0] entries) and the second is just a single object (an array of
> byte[], with null entries).
>
> Any JVM. It's the language definition.
Ah, right. The Java multidimensional-array stuff always makes my head hurt..
The change seems obviously better, then, since we promptly go and
replace all the top-level array entries with new values.
-O