Hi, I am creating a class that is like a (struct in c++),
class MyStructTest { public String var1, var2, var3; public MyStructTest(String var1, var2, var3) { this.var1 = var1; this.var2 = var2; this.var3 = var3; } }
then i make an arraylist of the type MyStruct
public ArrayList<MyStructTest> myList = new ArrayList<MyStructTest>();
i want to be able to add items to the arraylist by being able to choose which String of the struct like
myList . element1 . var1 = "something"; and so on
and then being able to access like myList element 1's var1.
how would i add things to the arraylist and access each part of each element as such.
Thanks
}