If I need to add an enum attribute to a list, how do I declare a list? Let's say an enumeration class:
public enum Country{ USA, CANADA; }
I want to make:
List<String> l = new ArrayList<>(); l.add(Country.USA);
What should be used instead of List<String>?
source share