code: public Date parse(String text) throws ParseException
      {
          ParsePosition pos = new ParsePosition(0);
          Date result = parse(text, pos);
          if (pos.getIndex() == 0) // ICU4J
              throw new ParseException("Unparseable date: \"" + text + "\"" ,
                                       pos.getErrorIndex()); // ICU4J
          return result;
      }
docs: Parses a date/time string. For example, a time text "07/10/96 4:5 PM, PDT"
  will be parsed into a Date that is equivalent to Date(837039928046).
  Parsing begins at the beginning of the string and proceeds as far as
  possible.  Assuming no parse errors were encountered, this function
  doesn't return any information about how much of the string was consumed
  by the parsing.  If you need that information, use a version of
  parse() that takes a ParsePosition.
  
  <p> By default, parsing is lenient: If the input is not in the form used
  by this object's format method but can still be parsed as a date, then
  the parse succeeds.  Clients may insist on strict adherence to the
  format by calling setLenient(false).
  
  <p> Note that the normal date formats associated with some calendars - such
  as the Chinese lunar calendar - do not specify enough fields to enable
  dates to be parsed unambiguously. In the case of the Chinese lunar
  calendar, while the year within the current 60-year cycle is specified,
  the number of such cycles since the start date of the calendar (in the
  ERA field of the Calendar object) is not normally part of the format,
  and parsing may assume the wrong era. For cases such as this it is
  recommended that clients parse using the parse method that takes a Calendar
  with the Calendar passed in set to the current date, or to a date
  within the era/cycle that should be assumed if absent in the format.
  
  @param text  The date/time string to be parsed
  
  @return      A Date, or null if the input could not be parsed
  
  @exception  ParseException  If the given string cannot be parsed as a date.
  
  @see #parse(String, ParsePosition)