Answers for "javascript array 2d number of rows"

4

how to get the dimensions of a 2d array in java

public class Main {
  public static void main(String[] args) {
    int[][] test = new int[10][4];
    int rows = test.length;
    int coloumns = test[0].length;
    System.out.println(rows);
    System.out.println(coloumns);
  }
}
Posted by: Guest on June-23-2020
0

JS get 2d array row count

var air = [
	['dragonfly', 'crane fly'],
	['eagle', 'falcon'],
	['jumbo jet','harrier'],
	['mosquito', 'wasp']
];

alert(air.length); // 4
Posted by: Guest on March-08-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language