Hi I changed my VM argument to:
-Xms1024m
-Xmx1024m
but I am still getting the
java heap space error.
I am trying to fill three ArrayLists:
* the first one has all the different train numbers
* the second one has the total amount of a specific train number
* the third one has the distinct total amount of a specific train number (based on the values entered in an ArrayList called 'temporary')
Here is my code:
This is the error I am getting:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.util.Arrays.copyOf(Unknown Source)
at java.util.ArrayList.grow(Unknown Source)
at java.util.ArrayList.ensureExplicitCapacity(Unknown Source)
at java.util.ArrayList.ensureCapacityInternal(Unknown Source)
at java.util.ArrayList.add(Unknown Source)
at MainProgramPart3_1.find(MainProgramPart3_1.java:225)
at MainProgramPart3_1.main(MainProgramPart3_1.java:103)
Line 103 is where I call my method find.
Line 225 is shown in the code by "//this is line 225".
Thank you!