final int MAX1 = 10000; final int MAX2 = 10000; int[] dice = new int[MAX1]; double[] ave = new double[MAX2]; for (int j=0; j