I have the following lists in a class
List<XYZ> Algo1;
List<XYZ> Algo2;
List<XYZ> Algo3;
and what I want is to create an array with these lists, try to do it like this:
List<XYZ> Algos[] = {Algo1,Algo2,Algo2};
I would like to be able to initialize it like that, but I get an error, the idea is to be able to call by means of a for and not individually
for(int i=0;i<Algos.length;i++){
Algos[i].add(new XYZ(...));
}
Something like that, some idea?
arrayof typeList <XYZ>, unless you say that this is not possible