How to allocate an array of AA? I tried two ways (new, and setting array length), in both cases the code compiles, but the executable seems run into infinite loop, and never finish. void allocAA() { int[int][] maps; maps = new int[int][3]; maps.length = 3; } int main() { allocAA(); return 0; }