6 Replies Latest reply on Mar 24, 2008 12:34 PM by 807601

    How can I return the current Date in Java?

      I am new to Java, and basically I want to know how I can return the current date as a variable, so for example, I have declared the following date variable
      private java.util.Date currentDate;
      How can I return the current date, do I have to write a method? To be more specific, I need to write a setMethod, that simply returns the current Date in Java.

      Please point me in the right direction.