Hi,
I have the following arrays findVar{int} and radius{double}.They are assigned values from a Stack<Object>
Stack<Object> Savestack
private static int FIND_PARMS = 5;
private int[] findVar = new int[FIND_PARMS];
private double[] radius = new double[FIND_PARMS];
/******Code***************
findVar = (int[]) Savestack.get(i-24);
for (i = 0; i < FIND_PARMS; i++)
{
outputFile.print(findVar[i] + " ");
}
radius = (double[])Savestack.get(i-23);
for (i = 0; i < FIND_PARMS; i++)
{
outputFile.println(radius[i]);
}
I am able to write the int values out using findVar
but not radius.
Could you please tell me what is it that I am not doing right?
I get this error
Exception in
thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:
-18
at java.util.Vector.get(Unknown Source)
at NewStatics.Parameter.saveParameters(Parameter.java:784
)
at NewStatics.Statics$SaveListener.actionPerformed(Static
s.java:630)