NaoDesu

DateCreated

Feb 20th, 2017
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package resources;
  2.  
  3. public class DateCreated {
  4.     private java.util.Date dateCreated;
  5.     //this class is for date created only
  6.    
  7.     public DateCreated() { //no-arg constructor
  8.         dateCreated = new java.util.Date(); //create obj java.util.Date
  9.     }
  10.    
  11.     public String getDateCreated() { //method
  12.         return this.dateCreated.toString(); //convert to string
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment