Parse string to get Date

Dateparse(String source)Parses text from the beginning of the given string to produce a date.
ObjectparseObject(String source, ParsePosition pos)Parses text from a string to produce a Date.

import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;

public class Main{
  public static void main(String args[]) {
    Date d = null;
    try {
      d = DateFormat.getDateInstance().parse("18-Nov-2010");
    } catch (ParseException e) {

The output:

Thu Nov 18 00:00:00 PST 2010  |  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.