[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: array question
test.length would return 200 (? or only the number of elements
so would not test[i].length return what you want? (i being an
Be careful how you do this because Java allows multi-dimensional arrays
to have a different 2nd value for each 1st value. ie.
test contains 8 values, but test contains only 3 values. If you
use test.length as the length of all subsequent arrays, you would get
an out of bounds exception when trying to access test because
test only has values in test, test and test (3
Bill Woodson wrote:
> Hi All,
> How do get the length of dimensions of a multi dimensional array that are
> not the first dimension? In other words I want to get the second dimension
> length of "int  test=new int;" which in this case is 100.