public static Month[] getWinterMotnths(){
Month[] winterMonthsArray = new Month[]{JANUARY, FEBRUARY, DECEMBER};
return winterMonthsArray;
}
public static Month[] getSpringMotnths(){
Month[] springMonthsArray =new Month[] {MARCH, APRIL, MAY};
return springMonthsArray;
}
public static Month[] getSummerMotnths(){
Month[] summerMonthsArray = new Month[]{JUNE, JULY, AUGUST};
return summerMonthsArray;
}
public static Month[] getAutumnMotnths(){
Month[] autumnMonthsArray =new Month[] {SEPTEMBER, OCTOBER, NOVEMBER};
return autumnMonthsArray;
}
package com.javarush.task.pro.task13.task1319;
/*
Месяцы в сезоне
*/
public enum Month {
JANUARY,
FEBRUARY,
MARCH,
APRIL,
MAY,
JUNE,
JULY,
AUGUST,
SEPTEMBER,
OCTOBER,
NOVEMBER,
DECEMBER;
public static Month[] getWinterMotnths(){
Month[] winterMonthsArray = new Month[]{JANUARY, FEBRUARY, DECEMBER};
return winterMonthsArray;
}
public static Month[] getSpringMotnths(){
Month[] springMonthsArray =new Month[] {MARCH, APRIL, MAY};
return springMonthsArray;
}
public static Month[] getSummerMotnths(){
Month[] summerMonthsArray = new Month[]{JUNE, JULY, AUGUST};
return summerMonthsArray;
}
public static Month[] getAutumnMotnths(){
Month[] autumnMonthsArray =new Month[] {SEPTEMBER, OCTOBER, NOVEMBER};
return autumnMonthsArray;
}
}