The Switch Statement In Java
Java switch statement is inherited from the older programming languages such as C and C++. It's considered a branching statement.
The Switch statement allows you to test the value of an expression, depending on that value, to jump directly to some location within the switch statement. This sounds similar to what the if / else statement do.