Question:When is a switch statement better than multiple if statements? 

Answer A switch statement is generally best to use when you have more than two conditional expressions based on a single variable of numeric type. 

+ Report
Total Preview: 1234
When is a switch statement better than multiple if statements?
Copyright © 2024. Powered by Intellect Software Ltd