2d array length in java
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 // gives count of rows
System.out.println(foo[0].length); //3 // gives count of columns for particular row
System.out.println(foo[1].length); //4
}
Also in Java:
- check if a char is a space java
- java how to print a string[]
- close searchview android java
- equls en java
- java sort array descending
- java identifiers
- java cannot find file path
- 2 decimal places print format JAVA
- how to remove spaces from an array in java
- java jaxb unmarshall xml to map
- hashset contains java
- primitive data types in java
- how to make a new arraylist java
- check if value exists in hashset java
- how to use the this keyword in java
- java while loop example
- validation list empty java
- string contains java
- money value commas java
- change java version command line debian
- HOW TO SUPRESS sonar warning in java code
- java define main function
- how to print to the console in java
- java strin to int