Sponsored Link •
|
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:
> > > How can I reference the size of a 2-dimensional/3-dimensional array using "array.length" ? Thanks! > > I think that the array.length will correspond to the first number, on the Left Hand Side bracket. This is number of rows of element where each element is itself an array. Now, If we use the element.length, we can target the other bracket too. > > I am not sure if that is the answer you are lookig for. > I'm totally guessing here, but try array[n].length I think I read that the length of inner arrays can vary, so the above syntax seems like it could be correct...don't have a compiler here at work...and I'm new at Java, too Hi, Sonny Consider following array: Use following style: 1) To get first line length, use That's all.
Replies: |
Sponsored Links
|