Method error, Class cannot be applied to different types?
<p>I want to convert a string from the main method to a integer in another method but I get an error.</p>

<pre><code>`    public static void main(String[] args) 
 {

      System.out.println("Enter a date (use the format -&gt; (MM/DD/YYYY)");

      //declare Scanner
      Scanner in = new Scanner (System.in);

      System.out.println("Enter a month (MM): ");
      String month = in.nextLine();

      System.out.println("Enter a day (DD): ");
      String day = in.nextLine();

      System.out.println("Enter a year (YYYY): ");
      String year = in.nextLine();

    String enteredDate = month + "/" + day + "/" + year;

    if (main.isValidDate(enteredDate))
      {
        main.leapYearCheck();
    }
}

private boolean isValidDate(String enteredDate) 
 {
    //logic
    parsedDate = null;// if it's valid set the parsed Calendar object up.
    return true;
}

// other code

private void leapYearCheck(String year) 
 {
        //leapyear
        int theYear = Integer.parseInt(year);

        if (theYear &lt; 100) 
        {
            if (theYear &gt; 40) 
            {
                theYear = theYear + 1900;
            }
            else 
            {               
                theYear = theYear + 2000;
            }
        }

        if (theYear % 4 == 0) 
        {
            if (theYear % 100 != 0) 
            {
                System.out.println(theYear + " is a leap year.");
            }
            else if (theYear % 400 == 0) 
            {
                System.out.println(theYear + " is a leap year.");
            }
            else 
            {
                System.out.println(theYear + " is not a leap year.");
            }
        }
        else 
        {
            System.out.println(theYear + " is not a leap year.");
        }
}//end of leap year

//other code }`
</code></pre>

<p>I get the error: 
    <code>Date.java:31: error: method leapYearCheck in class Date cannot be applied to given types;
            main.leapYearCheck();
                ^
  required: String
  found: no arguments
  reason: actual and formal argument lists differ in length
1 error</code></p>

<p>I don't understand this error. Says I require a String, and since the method uses an integer (I figure) I need to return a string?? How would I fix this?</p>
