Accessing an arrayList containing arrays.
in
Programming Questions
•
2 years ago
Hi guys,
I am having a problem when creating an arrayList full of arrays. At the moment each array is only two items long (it will be longer once the code is in place), and these arrays are added to an arrayList. We have used an arrayList instead of a normal 2D array because we don't know how many arrays will be generated by the program during setup.
When I print my arrayList, which is 3 items long, each item containing an array of 2 elements, I get the following message :
[[I@45c97b, [I@1aecc3a, [I@e22f2b]
Any ideas what is going on here? Is this some sort of storage location for the arrays on the system? How do I go about accessing the individual array items, inside of each arrayList item?
Many thanks in advance,
Andy.
1