I am modifying my question to make it more understandable. I have the following arraylist
ArrayList<AnotherClass> exmapleName = new ArrayList<AnotherClass>();
// AnotherClass is a class I created, I store objects of the class in this array, the code to this doesn't matter this works.
Inside of exampleName I have different types of data
public AnotherClass (String someString, int someInt, int anotherInt, int[] intArray, ArrayList<Integer> arrayList)
//Header of the constructor
Now what I need to do is access and store arrayList[0]. But I need to do it once the object has been created so there is actually something inside arrayList.
This is what I've tried but doesn't seem to work
AnotherClass test1 = exampleName.get(1);
ArrayList<Integer> test2 = test1.arrayList;
int test3 = test2.arrayList[0];
// I broke it down into separate lines to make it more understandable
compiler errors are as follows
cannot find symbol
int test3 = test2.arrayList[0];
symbol: variable arrayList
location: variable test2 of type ArrayList<Integer>
1 error