While switch will only allow you to switch using equality against integer or Enum types, if lets you use any boolean logic. char, byte, short can be used in switches too.
What can I use instead of switch-case Java?
While switch will only allow you to switch using equality against integer or Enum types, if lets you use any boolean logic. char, byte, short can be used in switches too.