Posted on 2005-03-30
Question. I have this tutorial regarding Arrays.
* Builds an integer multiplication table. No particular
* behavior is guarenteed for a negative input value. For
* example, if max was 3, the table would look like this:
* Notice that the table has max+1 rows and columns.
* @param max The number the table goes up to
public int getMultTab(int max)
int row = 0;
int col = 0;
int ans = new int[row][col];
for (int i = 0; i < ans.length; i++)
for (int j = 0; j < ans[i].length; j++)
ans[i][j] = i*j;
Am I going abou this the right way? I dont think i'm thinking about it correctly. Any insight into this would be helpfull. I'm trying to understand this array stuff. If anybody has a simplistic way to view how you would look at this, it would help greatly.