I need to implement switch statement for range values I can use if else but I think performance of switch will be better.
I have requirement like if value of variable is in range between 1-150 I will process my logic. If value of variable is in range between 150-300 then some other logic and if range is in 300-450 then some different logic and so on.
So how I can use switch in this case because generally I used switch with fixed values. Thanks in advance.