I have a matrix for example 5x10.
double[][] matrix = new double[5][10]
I would like to know the size of these matrix, But if I do it:
matrix.length
It only return me columns size: 10
How could I do it?
matrix.length
gives you the number of rows.
matrix[0].length
gives you the number of columns (assuming all rows have the same length).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With