当前位置: 代码迷 >> Java相关 >> public final static day解决方案
  详细解决方案

public final static day解决方案

热度:9088   发布时间:2013-02-25 21:50:58.0
public final static day
public final static Day
  MONDAY = new Day(1, "Monday"),
  TUESDAY = new Day(2, "Tuesday"),
  WEDNESDAY = new Day(3, "Wednesday"),
  THURSDAY = new Day(4, "Thursday"),
  FRIDAY = new Day(5, "Friday"),
  SATURDAY = new Day(6, "Saturday"),
  SUNDAY = new Day(7, "Sunday");
  public final static Day[] day = {
  MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
  FRIDAY, SATURDAY, SUNDAY
  };
为什么?

------解决方案--------------------------------------------------------
static final 就是一个常量了. 当常量对待..


  相关解决方案