Horje
how to get the dimensions of a 2d array in java Code Example
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);
  }
}
java length of matrix
public static void main(String[] args) {

    int[][] foo = new int[][] {
        new int[] { 1, 2, 3 },
        new int[] { 1, 2, 3, 4},
    };

    System.out.println(foo.length); //2
    System.out.println(foo[0].length); //3
    System.out.println(foo[1].length); //4
}




Java

Related
spring mvc get all request parameters Code Example spring mvc get all request parameters Code Example
required a bean of type 'org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder' that could not be found. Code Example required a bean of type 'org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder' that could not be found. Code Example
java math power Code Example java math power Code Example
start activity for result deprecated Code Example start activity for result deprecated Code Example
space in java Code Example space in java Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7