Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
An enum can, just like a class , have attributes and methods. The onlydifference is that enum constants are public , static and final (unchangeable - cannot be overridden). An enumcannot be used to create objects, and it cannot extend other classes (but it can implement interfaces).
7th Apr 2020, 3:48 AM
Ayush Kumar
Ayush Kumar - avatar