How do I create an ArrayList with integer and string input types? If I create one as:
ArrayList
List sections = new ArrayList
Just use Entry (as in java.util.Map.Entry) as the list type, and populate it using (java.util.AbstractMap’s) SimpleImmutableEntry:
List> sections = new ArrayList<>(); sections.add(new SimpleImmutableEntry<>(anInteger, orString)):