Java Switch Block
If you want to evaluate an expression, based on the evaluation results some piece of code needs to be executed then we have a switch block.
switch block evaluates expression based on the expression results, switch case will be executed.
If there is no switch case have the same value as what expression is resulted then default block will be executed.
Please remember switch block will be executed only once.