I’m using Java & Processing

Hey I’m trying to follow 10.6: Neural Networks: Matrix Math Part 1 - The Nature of Code, but got stuck where he makes each matrix[i] its own array. I couldnt figure out if in java it be float[] matrix[i], which didnt work or matrix[i] = []. which dont work or if there another way to do as he did but in java.

here where I got so far in my java version yes it dont work;

```
class Matrix{
float rows, cols;
Matrix(float rows, float cols){
this.rows = rows;
this.cols = cols;
float[] matrix;// here I'm suppose to make a new array I think I have
for (int i = 0; i < rows; i++){
float [] matrix[i]; here I need to make a new array for each i, the error pops up IDK how to fix it.
}
}
}
```