开通VIP,畅享免费电子书等14项超值服
首页
好书
留言交流
下载APP
联系客服
2010.10.27
public class Topic {private TopicStatus status = TopicStatus.NORMAL;// 状态(是否锁定)public TopicStatus getStatus() {return status;}public void setStatus(TopicStatus status) {this.status = status;}public static enum TopicStatus {NORMAL("正常"),LOCKED("锁定");private final String label;private TopicStatus(String label) {this.label = label;}/** 显示的名称 */public String getLabel() {return this.label;}/** 所代表的值 */public String getValue() {return this.name();};}}
微信登录中...请勿关闭此页面
定义了TopicStatus,然后把它作为一个变量类型。这是什么用法?
不理解