switch statement in java
// syntax of switch statement in java
switch(expression)
{
case 1 value :
// code goes here
break;
case 2 value :
// code goes here
break;
case 3 value :
// code goes here
break;
.
.
.
.
default: // optional
// default code goes here
}