In my trying to understand java, and learning it as a beginner,
i am trying to understand arrays and codes. if i had an array called Table
of the integer type having 3 rows and 3 columns, and the constant variable
size_of_array has been defined as 3, how would i write the code.
04-25-2000, 08:46 AM
Tom Duffy
Re: code for an array
Hello Bob:
What you are describing is a two dimensional array. You could declare the
Table array like this:
int[][]Table = new int[3][3];
Then reference the cells in the array using 2 indexes. The first cell would
be:
Table[0][0] = some_int_value;
You could easily use your size constant in place of the threes.
Hope this helps.
Tom Duffy
"bob" <billybob2@ca.freei.net> wrote:
>
>In my trying to understand java, and learning it as a beginner,
>i am trying to understand arrays and codes. if i had an array called Table
>of the integer type having 3 rows and 3 columns, and the constant variable
>size_of_array has been defined as 3, how would i write the code.