int[] act = new int[99999999];

↑これだと
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
だったんですけど・・・