import java.util.Scanner;
//=================================================================================================
public class EnumSeason {
//-------------------------------------------------------------------------------------------------
    private static final Scanner keyboard = new Scanner(System.in);

    private enum Season {SPRING,SUMMER,FALL,WINTER};
//-------------------------------------------------------------------------------------------------
    public static void main(String[] args) {

        Season theSeason;
        int seasonIndex;
        Season[] allSeasons;

        allSeasons = Season.values();
        for (seasonIndex=0;seasonIndex < allSeasons.length;seasonIndex++) {
            System.out.println("Season " + seasonIndex + " is " + allSeasons[seasonIndex]);
        }

        theSeason = Season.SUMMER;
        System.out.println("Your season is (the Endless) " + theSeason);

        System.out.print("Enter your season : ");
        theSeason = Season.valueOf(keyboard.nextLine().toUpperCase());
        System.out.println("Your season is " + theSeason);
    }
//-------------------------------------------------------------------------------------------------
}
//=================================================================================================
