Код: Выделить всё
int caseNum = 2;
switch(caseNum)
{
case 2:
System.out.println("Happy");
break;
case 2:
System.out.println("Birthday");
break;
case 2:
System.out.println("To the ground!");
break;
default:
System.out.println("
Подробнее здесь: [url]https://stackoverflow.com/questions/24046801/why-cant-i-have-a-duplicate-case-in-my-switch-statement[/url]