I'm trying to write a simple program that will simulate a scenario described in a probability question. In order to do so, I tried to create and populate a large 2-dimensional array, but the compiler continues to say that the java heap size isn't large enough and when I allocate more memory to the JVM, the process eats up my CPU to the point where my laptop crashes (mind you, it's an ultrabook with an i7 and 8GB of ram). Is this just not possible/recommended in Java? Is there another way? Please help!
This is the line that's the problem (2-dimensional array with 5^12 rows and 12 columns):
int[][] sequences = new int[244140625][12];
P.S. I'm a bit of a beginner when it comes to programming... thank you in advance!