java file may have only one public class. You can therefore declare only one public enum in a . java file . You may declare any number of package-private enums.
Read moreCan enums have values Java?
The Java enum type provides a language-supported way to create and use constant values . By defining a finite set of values, the enum is more type safe than constant literal variables like String or int.2 Eyl 2021
Read more