The following code works in C#:
public void DoSomething(float[][] array){
for (int i = 0; i < array.GetLength(0); i++)
{
int len = array[0].length;
double[] copy = new double[len];
Array.Copy(array[i], copy, len);
...
}
}
I'm attempting to convert it into Java. I tried this:
public void DoSomething(float[][] array){
for (int i = 0; i < array[0].length; i++)
{
int len = array[0].length;
double[] copy = new double[len];
copy = Arrays.copyOf(array[i], len);
...
}
}
But I get the error message:
Type mismatch: cannot convert from float[] to double[]
What can I do to make it work in Java?