[273] in java-interest
Re: class Array
daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Sat Jun 10 21:37:35 1995
From: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
To: majordom@java.Eng.Sun.COM (Peter Kessler)
Date: Sat, 10 Jun 1995 18:08:37 -0800 (PDT)
Cc: java-interest@java.Eng.Sun.COM
In-Reply-To: <9506102357.AA05402@analemma.Eng.Sun.COM> from "Peter Kessler" at Jun 10, 95 04:57:50 pm
Hi Peter,
> The language spec says `In the class hierarchy there is a class named
> Array, which has one instance variable, "length".' (Section 3.3.1 Array
> Detail.)
> I would have thought, therefore, that I could have a method that took
> as a parameter an instance of any subclass of Array (e.g. any array
> instance), and the method would be able to determine the length of the
> array instance. But I can't seem to find the class Array. I thought it
> would be in java.lang.Array, but it doesn't seem to be anywhere. Any hints?
This class currently isn't actually a "real" class. The VM generates one if
needed but there is no source for it. This is an ommision that we'd like
to fix in a future release.
> I can code around it in my case by passing the length of the array
> (rather than the array itself), but the spec should be fixed (or clarified).
As long as your array's always contain objects you could use an array of
Object[]. We'll fix this in future releases.
Have fun,
Arthur van Hoff (avh@eng.sun.com)
http://java.sun.com/people/avh/
Sun Microsystems Inc, M/S UPAL02-301,
100 Hamilton Avenue, Palo Alto CA 94301, USA
Tel: +1 415 473 7242, Fax: +1 415 473 7104
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com