0
Is there much difference between if statement and select case statement?
3 Antworten
+ 6
Huge difference:
Switch Case has better efficiency and is faster and it uses a jump table method to reach the required block to execute.
If-else uses different technique!
In "if" statement, we can easily provide a range condition (for example: age>=18 && age<=45).
There is no such option when using switch case: We can only provide a particular value while using switch case.
Both have their own importance in different types of programs.
0
Both have their own importance in different types of programs.
- 5
no difference in functionality