79822999

Date: 2025-11-18 05:21:40
Score: 2
Natty:
Report link

Is this mechanism even necessary today?

yes ofcourse.This ensure the compile time safety and keeps all behavior in one place.

When it is a code smell?

if enum is too large and Overloading Enums with business logic

How often is Enum used in this way?

This is still used.This is useful when finite constants are there,cleaner than switch statements

you can refer this

https://prgrmmng.com/enum-constant-specific-class-bodies-advanced-scenarios

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is this me
  • Low reputation (0.5):
Posted by: mariya cherian