Need help declaring methods
<p>Java program that first asks the user for a list of dates, and then prints the earliest date, the latest date, and the average year of the dates, I can't get it to compile to save my life, having trouble declaring methods in other methods, I am very new to programming.</p>

<pre><code>import java.util.*;

public class Proj6 {
   public static void main(String[] args) {
    Scanner s = new Scanner(System.in);
    System.out.print("Enter a list of dates: ");
    String list = s.nextLine();

    StringTokenizer st = new StringTokenizer(list, ", ");
    String[] dates = new String[st.countTokens()];

    for (int i = 0; i &lt; dates.length; i++) {
        dates[i] = st.nextToken();
    }


    Proj6.printEarliest(dates);
    Proj6.printLatest(dates);
    Proj6.printAvgYear(dates);
}

/**
 * getMonth returns the month in a date
 * of the form month/day/year
 *
 * @param date - A date of the form month/day/year
 * @return The month of the given date
 */
public static int getMonth(String date) {
    StringTokenizer st = new StringTokenizer(date, "/");
    return Integer.parseInt(st.nextToken());
}

/**


 * getDay returns the day in a date
 * of the form month/day/year
 *
 * @param date - A date of the form month/day/year
 * @return The day of the given date
 */
public static int getDay(String date) {
    StringTokenizer st = new StringTokenizer(date, "/");
    st.nextToken();
    return Integer.parseInt(st.nextToken());
}


/**
 * getYear returns the year in a date
 * of the form month/day/year
 *
 * @param date - A date of the form month/day/year
 * @return The year of the given date
 */
public static int getYear(String date) {
    StringTokenizer st = new StringTokenizer(date, "/");
    st.nextToken();
    st.nextToken();
    return Integer.parseInt(st.nextToken());
}

/**
 * printEarliest prints the date that comes chronologically
 * first from the dates array
 *
 * @param dates - An array of dates, all of the form month/day/year
 */
public static void printEarliest(String[] dates) {

    int i = 0;
    Proj6.getYear(dates);
    Proj6.getMonth(dates);
    Proj6.getDay(dates);
    for (i= 0; i &lt; dates.length; i++) {
        if(getYear.dates [i]&lt;=getYear.dates[i])

        st.nextToken();
    }
        System.out.println("Earliest date:" + dates[i]);
    }







/**
 * printLatest prints the date that comes chronologically
 * last from the dates array
 *
 * @param dates - An array of dates, all of the form month/day/year
 */
public static void printLatest(String[] dates) {


}

/**
 * printAvgYear prints the average year among all the dates in
 * the dates array
 *
 * @param dates - An array of dates, all of the form month/day/year
 */
public static void printAvgYear(String[] dates) {
    proj6.getYear();
   int sum = 0;
   int avg = 0;
    for (int i = 0; i &lt; dates.length; i++) {
        sum = getYear + sum;
        dates[i] = st.nextToken();
}
avg = sum/dates.length;
System.out.println("Average:" + avg);
</code></pre>

<p>}
}</p>
