This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
public void setLenient(boolean lenient)Specify whether or not date/time parsing is to be lenient. With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format. With strict parsing, inputs must match this object's format.
Parameters: lenient - when true, parsing is lenient See Also: Calendar.setLenient(boolean)
parse will throw a null pointer exception if the format is a mismatch.
If you look in the javadoc for java.util.Date, it's constructor description states that a Date created with the new keyword defaults to the current date/time.
The constructor you are using allows you to define the format and Locale in one line without need for a second call to applyPattern.