Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to get the length of a jagged array 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
    System.out.println(foo[0].length); //3
    System.out.println(foo[1].length); //4
}
Comment

PREVIOUS NEXT
Code Example
Java :: Accept Integer only in if else statement 
Java :: zombie testing java 
Java :: java bean go to other page 
Java :: mostrar divisores java 
Java :: java coding standards for constants 
Java :: java.sql.SQLException: Invalid column index 
Java :: Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.util.zip.ZipException: invalid code -- missing end-of-block 
Java :: android studio analyze apk 
Java :: Fomating .json 
Java :: remove minimum element from stack java 
Java :: how to get address of object in java 
Java :: intent from notification with extra to activity 
Java :: last resultset method 
Java :: Java Default capacity and load factor 
Java :: Java byte Keyword 
Java :: kotlin to java converter 
Java :: how to write no in java 
Java :: text field background color swing 
Java :: java get end of date 
Java :: hint property of plain text in android studio 
Java :: java producer consumer queue 
Java :: on offline event spigot example 
Java :: ava program to add two numbers taking input from user 
Java :: how do i get DefaultTableModel rows sum in column in java 
Java :: Join Two Java Strings 
Java :: connectionpool in jdbc 
Java :: Accesses Constructor of Abstract Classes 
Java :: get bimap by uri in android 
Java :: java declared fields vs fields 
Java :: Jax-RS PUT annotation 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =