Here you can find the source of parse(String dateString)
public static java.util.Date parse(String dateString)
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public final static String DEFAULT_FORMAT = "yyyyMMdd"; public static java.util.Date parse(String dateString, String dateFormat) { if (dateString == null || "".equals(dateString.trim())) { return null; }//w ww.ja va2 s . c om DateFormat sdf = new SimpleDateFormat(dateFormat); Date date = null; try { date = sdf.parse(dateString); } catch (Exception e) { e.printStackTrace(); } return date; } public static java.util.Date parse(String dateString) { return parse(dateString, DEFAULT_FORMAT); } }