You CAN NOT use logical operators in the switch case statements.
A switch statement can be seen as an alternative to an if-else statement. Comparing switch-case and if-else statements, their differences only show when dealing with a large set of selections; in these cases, the switch statements will prove to have faster processing power due to their fixed depth structure. Switch statements are also easier to debug and maintain. Though switch statements can get lengthy, their fixed depth makes it easy to spot and manipulate problem areas.
When deciding between if-else and switch-case, always consider how many options you will be working with, if changes in the code might be necessary over time, and how fast you need the processing speed to be.
--Thank you for reading my first post! Feel free to comment and follow. I'm here to learn just as much as I am here to share my findings through my journey to becoming a software engineer.