title: Displaying Date Of Birth in java by using Date Util
body: <p>I'm testing a Person class that models a person with name, address and date of birth.
  How do I set dob (date of birth)?<br>
  Here is my Person class: </p>
  
  <pre><code>import java.util.Date;
  public class Person{  
      private String name;   
      private String address;  
      private Date dob;  
  
  
      public Person( ){
          name = null;
          address = null;  
          dob = null;
      }
  
      public Person(String nameValue, String newAddress, Date newDob){  
          name = nameValue;
          address = newAddress;
          dob = newDob;  
      }
  
  
      public String getName(){
          return name;
      }
  
      public void setName(String nameValue){
          name = nameValue;
      }
  
      public int getAddress(){
          return address;
      }
  
      public void setAddress(String newAddress){
          address = newAddress;
      }
  
      public int getDateOfBirth(){
          return dob;
      }
  
      public void setDateOfBirth(Date newDob){
          dob = newDob;
      }
  
      public void print(){
          System.out.println("Name: " + name);  
          System.out.println ("Date Of Birth: " + dob);  
          System.out.println ("Address: " + address);
      }
  
  }   
  
  
  PersonTester{    
    Person a = new Person();  
    a.setName("John Smith");
    a.setDateOfBirth (01/08/1985);??? - doesn't work
  </code></pre>