Enumeration

what is enum class in Java

Definition enum class is for define constant. It will contain the value that will not change during the program is working Reason for using the enum class Sometimes, the program need constant value that should not changed. We use enum class for define the value. We calls, “define Constant” History The notion of constant is came from C language. C used define Preprocessor and const keyward. C code example #include <stdio.