|
Getting the current date in java |
|
|
|
|
Sunday, 24 January 2010 |
To get the current date in java then use the gettime() method
here is an example method
public void printCurrentDate() { Date theDate = new GregorianCalendar().getTime(); System.out.println("The current date is " + theDate); }
|