Originally posted by C Law: ...Is the "length" attribute in an array a public instance variable?
Yes. "The array's length is available as a final instance variable length." (Ref: JLS - Section 10.3.) [ March 21, 2006: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Originally posted by C Law: Why we use length() to calculate the length of a string, but "length" to compute the length of an array?
Old naming conventions. We also use size() on java collections including arraylists so don't think the confusion stops at strings and typed arrays. [ March 21, 2006: Message edited by: Scott Selikoff ]