Update Question2.java

isn't it dateformatter instead of dateformat in the question?