class TestAlloc { public static void main(String[] args) { if (args.length != 2) { System.out.println("Need two command-line args: number and size"); System.exit(1); } int number = Integer.valueOf(args[0]); int size = Integer.valueOf(args[1]); int[] arr; for (int i=0; i<number; ++i) { System.out.println(i); arr = new int[size]; } } }