請編寫一個關於星期幾的枚舉WeekDayjava
要求:ide
枚舉值:Mon,Tue,Wed,Thu,Fri,Sat,Sun get
該枚舉要有一個方法,調用該方法返回中文格式的星期(星期一...)it
package chapter11_04; public enum WeekDay { Mon{ @Override public String getChinaWeek() { return "星期一"; } }, Tue{ @Override public String getChinaWeek() { return "星期二"; } }, Wed{ @Override public String getChinaWeek() { return "星期三"; } }, Thu{ @Override public String getChinaWeek() { return "星期四"; } }, Fri{ @Override public String getChinaWeek() { return "星期五"; } }, Sat{ @Override public String getChinaWeek() { return "星期六"; } }, Sun{ @Override public String getChinaWeek() { return "星期日"; } }; public abstract String getChinaWeek(); }