这是代码:
enum Status {
STATUS_OPEN(10),
STATUS_STARTED(11),
STATUS_INPROGRESS(12);
private final int status;
Status(int aStatus) {
this.status = aStatus;
}
public int getStatus() {
return this.status;
}
}
class StatusTest3 {
public static void main(String[] args) {
for (Status stat : Status.values()) {
System.out.println(stat + " value is " + stat.getStatus());
}
}
}
返回什么Status.values()
?
输出是:
STATUS_OPEN value is 10
STATUS_STARTED value is 11
STATUS_INPROGRESS value is 12