Here you can find the source of parseString2Date(String date)
public static Date parseString2Date(String date) throws ParseException
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String PATTERN = "yyyy-MM-dd"; public static Date parseString2Date(String date, String pattern) throws ParseException { return getSimpleDateFormatInstance(pattern).parse(date); }/* w ww . j a va 2 s . c o m*/ public static Date parseString2Date(String date) throws ParseException { return parseString2Date(date, null); } private static SimpleDateFormat getSimpleDateFormatInstance(String pattern) { return new SimpleDateFormat(pattern == null ? PATTERN : pattern); } }