Convert Date value to String

ReturnMethodSummary
StringtoString()Converts this Date object to a String of the form:

import java.util.Date;

public class Main {
  public static void main(String args[]) {
 
    Date date = new Date();
    System.out.println("Date is : " + date.toString());
 
  }
}

The output:


Date is : Sat Oct 30 09:18:38 PDT 2010
w__w_w_.__j___av___a___2___s_._co__m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.