I get errors targetting the ' that I use for each case. I tried using nothing and also quotes in their place, but no luck. Whats the problem.
If this isn't the place to get help with programs, please point me in the right direction.
import java.util.StringTokenizer;
class Birthday {
public static void main(String[] arguments) {
StringTokenizer st1;
String birthday = "09/08/1900";
st1 = new StringTokenizer(birthday, "/");
String month = st1.nextToken();
switch (month) {
case '01':
month = "January";
break;
case '02':
month = "February";
break;
case '03':
month = "March";
break;
case '04':
month = "April";
break;
case '05':
month = "May";
break;
case '06':
month = "June";
break;
case '07':
month = "July";
break;
case '08':
month = "August";
break;
case '09':
month = "September";
break;
case '10':
month = "October";
break;
case '11':
month = "November";
break;
case '12':
month = "December";
break;
}
String day = st1.nextToken();
String year = st1.nextToken();
System.out.println("The month is " + month);
System.out.println("The day is " + day);
System.out.println("The year is " + year);
}
}