What Is The Difference Between An If Statement And A Switch Statement
Posted by Madhu Sudhan
29 Dec, 2011
The if statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.
The if statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.
Comments Received:
Please give your suggestions and feedback: