Here you can find the source of parse(String DateStr)
public static Date parse(String DateStr) throws Exception
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parse(String DateStr) throws Exception { return new SimpleDateFormat("yyyyMMdd").parse(DateStr); }/*from www . j ava2 s . c om*/ }