Enum Anatomy

Better option for declaring constants as provide more functionality than properties files(constructor, mutators, accessors )

  1. Item 34: Use enums instead of int constants
  2. Item 35: Use instance fields instead of ordinals
  3. Item 36: Use EnumSet instead of bit fields
  4. Item 37: Use EnumMap instead of ordinal indexing
  5. Item 38: Emulate extensible enums with interfaces
  6. Item 39: Prefer annotations to naming patterns
  7. Item 40: Consistently use the Override annotation
  8. Item 41: Use marker interfaces to define types

Published by

Unknown's avatar

sevanand yadav

software engineer working as web developer having specialization in spring MVC with mysql,hibernate

Leave a comment