Unlike the if-then and if-then-else statements, the switch statement applies to a known number of possible situations. You can use simple types of byte, short, char, int. You can also use Enum and String (starting with JDK7), and special classes that are wrapper for primitive types: Character, Byte, Short, Integer.
Duplicating case values is not allowed. The type of each value must be compatible with the type of expression.
On this page of the site you can watch the video online The switch operator java with a duration of hours minute second in good quality, which was uploaded by the user JavaLight 17 April 2017, share the link with friends and acquaintances, this video has already been watched 28 times on youtube and it was liked by 1 viewers. Enjoy your viewing!