+ 2
what are advantages of switch case over if ()?
2 Respuestas
+ 17
As a complement for dear Jamie's explanation, you'd take a look at this link for further information.
[https://stackoverflow.com/questions/1028437/why-switch-case-and-not-if-else-if]
+ 7
switch case is much faster to execute, coz compiler directly jumps to the case while in a if-else it has check each statement, if its true or not.