Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception error at run time! ?? what to do?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all!
I just compiled my code and fixed all the compilation errors. But now at runtime I get te following message:
-----------------------------------------------------
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0>=0
at java.util.Vector.setElementAt(Vector.java:482)
at Romo.makeFirst(equaSolver.java)
at equaSolver.main(equaSolver.java)
-----------------------------------------------------
I have already resolved problem such as ArrayIndexOutOfBoundsException exceptions, but when it concerned arrays only, this seems to be a problem with my vector.. Is there a limit in the number of elements we can put in a vector.. because my code does create a vector that is be huge, and eventually gets smaller..

Thanks to anyone who can help!!
 
if you show us the code containing your loop we can have a look-see and try to identify the problem. I doubt it is the size of your vector, their size is only really limited by the heap allocation of your processor - more likely to be a small logic error. But can't tell until I see the code.
 
Hi pipk!

ok thank you , at least I know its not the vector size then ;).. (its true since its an object and it allocates addresses..you must be right ;) )

I would like to show you the loop but wich one ? of which class and method?

This is a genetic algorithm program and is fairly confusing..
 
Ok I figured it out! I was having problems with my creation of the array of vectors.. solution founds,,thanx!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top