That's because class SimpleDateFormat does not override the toString() method from class Object, and class GregorianCalendar does.
If you print an object with System.out.println(...), then toString() will be called on the object to get a printable
string.