title: How do I call a method of one class from another class?
body: <p>I have a method <code>public boolean validDate (int day, int month, int year)</code> which does the following:</p>
  <blockquote>
  <p>The month can only be in the range 1-12 and a month must have the correct number of days eg 30.2.1997 is invalid because February can only have 28 days, or 29 days if the year is a leap year and this method must return true if the date is valid and false if the date is invalid.</p>
  </blockquote>
  <p>This method is in a class called <code>ValidDate</code>. And I need to call it from another class. How would I go by doing this? I added an image of what I have so far which is probably wrong.</p>
  <p><img src="https://i.stack.imgur.com/WVoDV.png" alt="enter image description here" /></p>