Question/ Objective / Doubt:
problem in passing the columns of the 2D int array to a function
Program / code:
int value[][]=new int[9][9];
int temp1[]=new int [9];
int temp2[]=new int 9;
for(int i=0;i<9;i++)
{
temp1=method(value[i]);
// temp2[i]=method(value[col]) //want to pass the columns one by one
}
//skeleton of the method
int method (int arr[])
{
//code
return i;
}
Description / Explanation:
I have a two dimensional int array value[ row][col ]
I want to pass this row & columns for a method which does some computations
I can pass the row but I couldn't do with the col.
My Try / My Effort:
method(value[ ] [ i ])
it gives error
I Think/ Hope / Guess:
i has to design another set up probably a method to pass there columns one by one
is there any other way to do ?
Jesh
Share knowledge; Grow together;
Edited by: java_jesh on Nov 6, 2007 1:21 AM
Edited by: java_jesh on Nov 6, 2007 1:23 AM