Character type, Boolean type and enumeration type can all be converted into integer type to judge, because shaping has great certainty in equality and inequality, and the decimals represented by float and double have limited precision after all, so it is difficult for computers to judge whether they are equal after exceeding the limit, so they cannot be used.
If else structure can be used
Therefore, switch can only be used for simple jump judgment, and of course it can also be replaced by if else structure.