+ 1
which one is better, switch case or if else?
in selection condition which one is better, switch case or if else?
4 Respuestas
+ 6
that really depends on the values and the conditions.
+ 5
switch case because much more faster if else and if else eat a ram like a tiger :)
+ 3
switch is used as substitution to if statement with many branches, for branching enum options, for multiple ranges and for special switch(true) design.
+ 1
switch case is faster than the if else ladder. If you have multiple options to choose from use switch statement.