Any label in
Java is specified by a colon. So if you write,
case 1:, this is called a
case label. And the 1 is called the constatnt of the case label.
A switch statement looks like this,
//some code.
switch (i) //consider i as an int.
{
case 1:
System.out.println("The value is 1");
case 2:
System.out.println("The value is 2");
default:
System.out.println("Some other value");
}
//some code.
Hope this helps.
Ahmed.