class TestTwoDimArrays {

    static int [][] myArray = new int[3][]; // initialize # of rows

    public static void main(String[] args) {

    myArray[0] = new int[3];                // initialize # of cols
    myArray[1] = new int[4];                // in each row
    myArray[2] = new int[5];

    for(int i=0; i<3; i++)                  // fill and print the array
        fillArray(i, i+3);

    System.out.println();
    } // end main()

    private static void fillArray(int row, int col) {

        for( int i=0; i<col; i++)
            myArray[row][i] = i;

        for( int i=0; i<col; i++)
            System.out.print(myArray[row][i]);

        System.out.println();
        
        int anar[] = new int[] {1,2,3};     // this works ok
        
    }

}