Here you can find the source of parse(String strDate)
public static Date parse(String strDate) throws ParseException
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String defaultDatePattern = "yyyy-MM-dd"; public static Date parse(String strDate) throws ParseException { return parse(strDate, getDatePattern()); }//from w w w. j av a 2s . co m public static Date parse(String strDate, String pattern) throws ParseException { SimpleDateFormat df = new SimpleDateFormat(pattern); return df.parse(strDate); } public static String getDatePattern() { return defaultDatePattern; } }