As far as I know, you cannot pass size of dimensions!
And it's better to use different syntax, not C++ syntax.
So just write
- public static void doOutput(String[] args, double[][] vector)
and it should work.
You can get the size of the passed array with vector.length .
By the way, in opposition to C++, each element of the array can have a different size. So vector[0].size and vector[1].size can be different!
That's much better than hardcoding the size of the second index to 40, isn't it?
Hi all,
I am trying to pass a two dimensional in java but there a problem in this function
-
-
public static void doOutput(String args[], double vector[][40])
-
Please what is the problem in this line