As we will see, conditional statement Switch works very much like the If-Else If-Else statement, with only a syntax difference. It executes an instruction based on the calculated value of a condition. The format of the Switch statement is the following:
switch (condition) { case value1: instructions; break; case value2: instructions; break; case value3: instructions; break; //...… Read more