I' would like to store user input into an ArrayList then place that ArrayList into another ArrayList. So sort of like a main category, which contains sub-categories that contain data.
Here is some of the code:
ArrayList<String> mainCat = new ArrayList<>();
ArrayList<String> subCat = new ArrayList<>();
Could I add the "subCat" ArrayList in the "mainCat" ArrayList?
Map<String, List<String>>(mapping main categories into lists of sub categories) would be a better choice then.