Question: what is the difference between switch and if else?
Answer: In the case of 'if-else' statement, either the 'if' block or the 'else' block will be executed based on the condition. In the case of the 'switch' statement, one case after another will be executed until the break keyword is not found, or the default statement is executed.