Paweł Baczyński wrote:Read again then.
Finally, you can use the built-in length property to determine the size of any array. The following code prints the array's size to standard output:
Yup, that's it. Note that
length is a
property of an array, not a
method. That is, you use
and not
That's kind of a departure from the teaching that all properties should be manipulated by accessor and mutator methods (getters and setters, mostly), but we just have to live with it.