Thanks to those who helped with my last question, I've now managed to
put all the relevent objects into the ArrayList with the following:
public void importData()
{
reader = new ReaderObject();
junkData = new ArrayList();
for(int i = 0; i < 10; i++)
{
int x = SIZE[i];
Xobject objectX = new Xobject(x);
double z = 0;
double temporaryArray[] = reader.getOneLine();
for(int column = 0; column < temporaryArray.length; column++)
{
z = temporaryArray[column];
objectX.arrayInXobject[column] = z;
}
junkData.add(i, objectX);
}
}
But now how do I access the methods inside of these objects in the
ArrayList ? This code doesn't work:
public double someMethod(int x, int y)
{
this.x = x;
this.y = y;
double z = 0.0;
z = junkData.get(x, Xobject.anotherMethod(y));
return z;
}
Could someone please help me to fix this.