I am having trouble getting the length of the first dimension in a multidimensional array. I have the following array.
I found some info on the net saying if I want to get the first dimension's length I do:
However, when I compile I get:
cannot resolve symbol method length()
Above this part of the code I have a length method that is working fine on the same array, however I am using the following format:
posted 10 years ago
The second one that seems to work is actually calling length() on the object at the cell [x][y] which must be a String or something that has a length() method. Array doesn't have a length() method, it has a length attribute - no parens. You'd have to call the inventors of the language to ask why some things have length, others have length() and others have size().
Remembering that a multi-dimensional array is just an array of arrays ...
Cheers! [ May 19, 2005: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi