Here you can find the source of parse(String date)
public static Date parse(String date) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String DATE_FORMAT = "yyyyMMdd"; public static Date parse(String date) throws ParseException { SimpleDateFormat sf = new SimpleDateFormat(DATE_FORMAT); return sf.parse(date); }//from ww w . j av a 2 s . c om }