I want to create an Array
of Strings
storing "names"; and these names should be used to create new ArrayLists named by the Strings in the Array.
It doesn't work this way. Is there a way to manage this or can you please explain why isn't that possible?
public String combiTop [] = {"1er","2er","3er","4er","5er","6er"};
topRowValue = new ArrayList<>();
for (int i = 0; i < combiTop.length; i++) {
ArrayList<Integer> combiTop[i] = new ArrayList<>();
for (int j = 0; j < 6; j++) {
combiTop[i].add(-1);
}
topRowValue.add(combiTop[i]);
}