Can an enum be a list?

Yes . If you do not care about the order, use EnumSet , an implementation of Set . enum Animal{ DOG , CAT , BIRD , BAT ; } Set<Animal> flyingAnimals = EnumSet.

Sizin İçin Seçtik  What is polymorphism in C++ with example?

Leave a Reply

Your email address will not be published. Required fields are marked *