If I have a method
doSomething(float[][] a)
and want to pass parameter to this method from main,
What is the syntax for floats in this example?
If I have a method
doSomething(float[][] a)
and want to pass parameter to this method from main,
What is the syntax for floats in this example?
The two common ways are as follows:
public class Main {
public static void main(String args[]) {
doSomething(new float[][] {{1,2},{3,4}});
float x[][]=new float[][] {{1,2},{3,4}};
doSomething(x);
}
static void doSomething(float[][] a) {
}
}