public class Tutorial
{
public static void main(String[] args)
{
byte age = 18;
switch (age)
{
case 18:
System.out.println("You are 18.");
break;
case 10:
System.out.println("You are young.");
break;
default:
System.out.println("What are you?");
}
}
}
No comments:
Post a Comment