Getting the current date in java

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);
}