| Nested if-else Statement | Switch statement |
1 | It becomes complicated for multiple selections. | It is easy to understand for multiple selections. |
2 | It uses an independent expression for each case. | It uses a single expression for all cases, but each case must have a constant value of integer type or character type. |
3 | The test condition can be given in a specified range of values. If the given condition matches then the statements under it will be executed. | Only a single expression is given in the switch statement which returns a single value. The test condition cannot be given in a specified range. It is the major drawback of the switch statement. |