An enumeration (enum) in Java is a special data type that allows for a variable to be a set of predefined constants. These constants are typically defined as a list of named values, and they can be ...
在 Java 使用 `enum` 這個 keyword 來宣告即可。從 Java Bytecode 可以發現,其實 `enum` 底層本身是個 `final class`, 也因此 `enum` 不能再繼承其他的 class (Java 是單一繼承)。 Constructor 設計成 __private ...