// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.util.ArrayList;

public class ALA2AA {
    public static void main(String[] args) {
        ArrayList<int[]> al = new ArrayList<int[]>();
        al.add(new int[] {0, 1});
        al.add(new int[] {0, 1, 2});
        al.add(new int[] {0, 1, 2, 3});
        int[][] a = al.toArray(new int[0][0]);
        for(int i = 0; i < a.length; i++) {
            for(int j = 0; j < a[i].length; j++) {
                System.out.print(" " + a[i][j]);
            }
            System.out.println();
        }
    }
}
