The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000



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.


length is the property of every array in Java

Posted by Kishori Sharan on December 10, 2000 at 8:06 PM

int[] a = new int[10] ;

Here a is the array . If you want to know the length of the array just use its property length ( a.length ) which will return an int.
System.out.println ( "Length of array a is " + a.length ) ;


Sponsored Links

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