Enumeration in Java (in HINDI) || How to define our own Data Types in Java (using enum)

preview_player
Показать описание
- The Enum in Java is a data type which contains a fixed set of constants.

- An enum is a special "class" that represents a group of constants (unchangeable variables, like final variables).

- To create an enum , use the enum keyword (instead of class or interface), and separate the constants with a comma.

- According to the Java naming conventions, we should have all constants in capital letters. So, we have enum constants in capital letters.

#LearningandTeachingCoding
Рекомендации по теме