Assignment #2 Answer
Oh man, oh man. I can't believe I ate the whole thing.
After doing a little Google search to help me out on how to use SimpleDateFormat I spent a while scratching my head wondering why you wanted to me to use GregorianCalendar or Calendar. Now I see. import java.text.*;
import java.util.*;
public class DateParse {
public static void main(String[] arguments) {
int month = 2;
int day = 3;
int year = 1976;
if (2 < arguments.length) {
month = Integer.parseInt(arguments[0]);
day = Integer.parseInt(arguments[1]);
year = Integer.parseInt(arguments[2]);
}
GregorianCalendar gregCal = new GregorianCalendar(year, (month - 1), day);
SimpleDateFormat sdf = new SimpleDateFormat("MMMM d, yyyy");
System.out.println(sdf.format(gregCal.getTime()));
}
}