Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

FUCKING JAVA

Name: Anonymous 2010-03-31 21:23

Now, I have to write a crossword solver using Java for an AI class - no problem, right?
...until you factor in FUCKING JAVA.

First, I created an arraylist of constraint objects - now there are only 16 of them on the example I'm running, and it just holds something like four integers. Then I get OUT OF HEAP MEMORY or some gay shit error like that, after swearing at the automatic garbage collection and calling it manually I saw that it didn't help, and then I thought I shouldn't have used a faggy arraylist in the first place - so I make an array.

I use a set of 36 to ensure it fits but I get an out of bounds index error
huh
I increase array size to 90
same error
reduce to 17
same error

WHAT THE FUCK

JAVA SHOULD DIE IN A FUCKING FIRE

Name: Anonymous 2010-04-01 0:23

Increasing the array size will not help with an ArrayIndexOutOfBoundsException.  You have to trace the problem to the loop or statement that causes the array's index to exceed the length of the array.  Seriously, this problem already exists in other languages and you should have no excuse for this ignorance.

As for your heap troubles, you're on your own.  As a last resort, increase the amount of memory the JVM has access to at run time with "java -Xms[min] -Xmx[max] [class file]"

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List