Example where if else is preferred over switch
Answers
Answered by
0
Answer:
YES
Explanation:
A switch statement is usually more efficient than a set of nested ifs. The compiler can do this because it knows that the case constants are all the same type and simply must be compared for equality with the switch expression, while in case of if expressions, the compiler has no such knowledge. ...
Similar questions
Physics,
18 hours ago
Social Sciences,
18 hours ago
Physics,
18 hours ago
English,
1 day ago
Social Sciences,
8 months ago
English,
8 months ago