Compare the following
if-else and switch statements
|1||In this we can test only one condition.||In this we can test multiple condition.|
|2||It can have values based on constraints.||It can have values based on user choice.|
|3||In this we cannot have different conditions.||In this case we can have only one expression but various value of the same expression.|
|4||If else statement is used to evaluate a condition to be true or false||A switch case statement is used to test for multiple values of the same variable or expression like 1,2,3 etc.|
Is there an error in this question or solution?