Java Course

public class Program
{
enum CarNumber{
CarOne,
CarTwo,
CarThree
}

public static void main(String [] args)
{
CarNumber a = CarNumber.CarOne;
switch(a)
{
case CarOne:
System.out.println("Car1");
break;
case CarTwo:
System.out.println("Car2");
break;
case CarThree:
System.out.println("Car3");
break;
}
}
}



Dodaj komentarz






Dodaj

© 2013-2024 PRV.pl
Strona została stworzona kreatorem stron w serwisie PRV.pl