.
When it is better to use switch statement instead of if-else ? why ?
Answers
Answered by
2
Answer:
Speed: A switch statement might prove to be faster than ifs provided number of cases are good. If there are only few cases, it might not effect the speed in any case. Prefer switch if the number of cases are more than 5 otherwise, you may use if-else too.....
Answered by
2
Answer:
A switch statement might prove to be faster than ifs provided number of cases are good. If there are only few cases, it might not effect the speed in any case. Prefer switch if the number of cases are more than 5 otherwise, you may use if-else too.
I HOPE IT HELPS
MARK ME AS BRAINLIEST
Similar questions