Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.ArrayIndexOutOfBoundsException: -1 < 0

807598Jan 16 2006 — edited Mar 1 2006
Hi,

I'm getting the following error and i'm really struggling to figure out what the problem is.
the error reads
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 < 0
        at java.util.Vector.elementAt(Vector.java:437)
        at MemPool.calcStimulation(MemPool.java:106)
        at Test.main(Test.java:50)
i have a MemPool class which begins as follows
public class MemPool
{
private Vector MemoryPool;

public Vector calcStimulation(Vector MemPool, Vector Training)
{
and a test class with has the main method to call this calss which is
public class Test
{
	public static void main(String[] args)
  	{
	MemPool m = new MemPool();
	Vector stim = m.calcStimulation(pool,trainingData);
	}
}
The above is just snippets of the code.
Can anyone point me in the right direction on how to solve this?

Cheers
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2006
Added on Jan 16 2006
12 comments
666 views