What is the difference between an if statement and a switch statement

The if statement is used to select among two alternatives. It uses a boolean expression todecide whichalternative should be executed. The switch statement is used to select among multiplealternatives. It usesan int expression to determine which alternative should be executed.

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions