[1941] in java-interest

home help back first fref pref prev next nref lref last post

Re: Q: array initialization.

daemon@ATHENA.MIT.EDU (Christophe Meessen)
Wed Sep 20 12:06:12 1995

Date: Wed, 20 Sep 1995 10:27:25 +0200
From: meessen@cppm.in2p3.fr (Christophe Meessen)
Cc: java-interest@java.Eng.Sun.COM
To: pdp@Stat.UFL.Edu

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

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post