title: How to create an attribute, getter, and setter for date in java?
body: <p>How would you put create an attribute of a class that is a date? I'm looking to make a start date an attribute, but am struggling with syntax</p>
  
  <pre><code>public class Adventure{
       private String Location;
       private int cost;
       private Localdate startDate;
  
       public void Setdate(int year, int month, int day){
          LocalDate startDate = LocalDate.of(year, month, day);
       }
       public LocalDate getDate(){
          return startDate;
       }
  }
  </code></pre>
  
  <p>For some reason, this isn't working for me. The first 2 private attributes can be ignored, but i'm just trying to do a getter and setter for a date attribute</p>