If I need to add an enum attribute to a list, how do I declare the list? Let us say the enum class is:
public enum Country{ USA, CANADA; }
I want to do:
List<String> l = new ArrayList<>();
l.add(Country.USA);
What needs to be used instead of List<String>?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…