Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Date;

public class Main {
    private static final String seasons[] = { "Winter", "Winter", "Winter", "Winter", "Spring", "Spring", "Spring",
            "Spring", "Fall", "Fall", "Fall", "Fall" };

    public static String getSeason(Date date) {
        return seasons[date.getMonth()];
    }
}