Here you can find the source of parse(String param)
public static Date parse(String param)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String patternDate = "yyyy-MM-dd"; public static Date parse(String param) { Date date = null;//w ww . ja va2 s.c om SimpleDateFormat sdf = new SimpleDateFormat(patternDate); try { date = sdf.parse(param); } catch (Exception ex) { ex.printStackTrace(); } return date; } }