How to create a 2D ArrayList
in
Programming Questions
•
8 months ago
Im trying to create a 2D ArrayList but is having some issues
Currently I have a single list like this
ArrayList aObject;
.
.
aObject = new ArrayList();
for (int i = 0; i< 5;i++)
{
aObject.add(new Entity()); //Entity is a Class
}
However I would like to be able to have a 2D (or possible 3D) ArrayList
Any suggestions ?
Currently I have a single list like this
ArrayList aObject;
.
.
aObject = new ArrayList();
for (int i = 0; i< 5;i++)
{
aObject.add(new Entity()); //Entity is a Class
}
However I would like to be able to have a 2D (or possible 3D) ArrayList
Any suggestions ?
1