Here you can find the source of parseDate(String format, String value)
public static synchronized Date parseDate(String format, String value) throws ParseException
//package com.java2s; //License from project: Open Source License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; public class Main { private static final Map<String, SimpleDateFormat> formatters = new HashMap<String, SimpleDateFormat>(); public static synchronized Date parseDate(String format, String value) throws ParseException { SimpleDateFormat df = getDateFormat(format); return df.parse(value); }//from w ww .j a v a 2 s . c om private static SimpleDateFormat getDateFormat(String format) { SimpleDateFormat df = (SimpleDateFormat) formatters.get(format); if (df == null) { df = new SimpleDateFormat(format); formatters.put(format, df); } return df; } }