If you have more than one condition to check on single variable or a single expression, then switch is better than if. In switch statement, program’s execution jumps to the matching value if found. If you use if condition, it checks one by one condition. So it is highly recommended to use switch, if you have to check a variable/condition/expression with multiple values.