Tagged: enum

Switch statement smells

Switch statement smells

We all know Switch Case statement is very handy to use when we need to write code for decision-making based on some constants, but we can avoid it by using polymorphism or Enums(if preferred)....