G
Goofball
Does anyone have any ideas on why that happened:
[java] Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
Explaining the situation. I have such code:
for (int i=0; i<10000-1; i++) {
for (int j=i+1; j<10000; j++) {
compareElements(arr, arr[j]);
}
}
Element of the array is a simple class that has two fields (one is
string and another is BitVector) and getters and setters for those
fields. Function compareElements compares the BitVectors of two
elements.
Now the problem: when I run the code, program runs only till then 1334
element in the first cycle. Then I receive the above exception.
Does anyone know, what can that be? Thanks for any help.
[java] Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
Explaining the situation. I have such code:
for (int i=0; i<10000-1; i++) {
for (int j=i+1; j<10000; j++) {
compareElements(arr, arr[j]);
}
}
Element of the array is a simple class that has two fields (one is
string and another is BitVector) and getters and setters for those
fields. Function compareElements compares the BitVectors of two
elements.
Now the problem: when I run the code, program runs only till then 1334
element in the first cycle. Then I receive the above exception.
Does anyone know, what can that be? Thanks for any help.