public static void main(String[] args) {
int[][] tabla=new int [5][3];
System.out.println(tabla.length);
for (int filas = 0; filas < tabla.length; filas++) {
for (int columnas = 0; columnas < tabla.length; columnas++) {
System.out.println(tabla[filas].length+" filas");
System.out.println(" ");
System.out.println(tabla[columnas].length+" columnas");
}
}
}
I know that when printing table.length gives me the number of rows, but I do not understand why when printing the variable rows (table [rows] .length) and the one of the columns (table [columns] .length) both show the number of columns. I have read on the internet that they say that they start counting in the line as if it were zero, but I do not finish it.