首页 > 其他分享 >SeasonState

SeasonState

时间:2022-12-29 18:56:05浏览次数:42  
标签:name System SeasonState String println out

public enum SeasonState {
    
    SPRING("春天"),
    SUMMER("夏天"),
    AUTUMN("秋天"),
    WINTER("冬天");
    
    String name;
    
    SeasonState(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return name;
    }
}

 

    @Test
    public void test43() {
        System.out.println(SeasonState.SPRING);
        System.out.println(SeasonState.SUMMER);
        System.out.println(SeasonState.AUTUMN);
        System.out.println(SeasonState.WINTER);
    }

 

标签:name,System,SeasonState,String,println,out
From: https://www.cnblogs.com/mingruifeng/p/17013276.html

相关文章