[1936] in java-interest
Re: Q: array initialization.
daemon@ATHENA.MIT.EDU (Christophe Meessen)
Wed Sep 20 07:24:30 1995
Date: Wed, 20 Sep 1995 10:27:25 +0200
To: Arthur van Hoff <Arthur.Vanhoff@Eng.Sun.COM>
From: meessen@cppm.in2p3.fr (Christophe Meessen)
Cc: java-interest@java.Eng.Sun.COM
At 11:40 19/09/95 -0800, Arthur van Hoff wrote:
>
>> SortElem v[] = new SortElem[10];
>> Here is a small program that didn't do what I expected
>>
>> Suppose a class SortElem;
>>
>> public class SortElem[
>> public int val;
>> ...
>> }
Oops it was declared as static public int val; my fault.
This may be explain why no execption was thrown at me.
Sorry. At least now the array initialization is clear to me.
It would be nice to specify in the reference manual that the created class array
is filled with null values after the
SortElem v[] = new SortElem[10];
instruction.
Bien cordialement,
Ch.Meessen
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com