Here you can find the source of parse(String calendarString)
public static Calendar parse(String calendarString)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Calendar parse(String calendarString) { try {//from www . j a v a 2 s. co m Date date = getDateFormat().parse(calendarString); Calendar cal = new GregorianCalendar(); cal.setTime(date); return cal; } catch (ParseException e) { e.printStackTrace(); } return null; } private static DateFormat getDateFormat() { DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); return formatter; } }