switch 썸네일형 리스트형 A Switch on String for JAVA A Switch on String for JAVA public enum Day { SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY; } switch (Day.valueOf(str)) { case SATURDAY: case SUNDAY: // weekend processing ... break; default: // weekday processing ... } 출처 : http://www.xefer.com/2006/12/switchonstring 더보기 이전 1 다음