The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Re :Array.length

Posted by Pierre on June 13, 2001 at 7:34 AM

> hi everybody!
> Any body can help me pls tell me where the "length" static variable exist in Java.It is not containing Java Doc as well as Java.lang.reflect.Array class also. But all we know this works well.

in the Java Language Specifcation :
http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html#64347 :
"10.7 Array Members
The members of an array type are all of the following:

The public final field length, which contains the number of components of the array (length may be positive or zero)
The public method clone, which overrides the method of the same name in class Object and throws no checked exceptions
All the members inherited from class Object; the only method of Object that is not inherited is its clone method "






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us