I know that to calculate the size of a 1D matrix in Java you use .length (so if you create a vector v using
It will print 3, but if I have a matrix A
It will also print 3, but how do you get it to print the other dimension (in this case 4)?
Thanks
Code:
int [] v= new int [3];
System.out.println(v.length);
It will print 3, but if I have a matrix A
Code:
int [][] A=new int[3][4];
System.out.println(A.length);
Thanks