- Java code
public enum OrderType{asc,desc}private OrderType ordertype;
如何设定声明的ordertype变量默认值为 asc?
------解决方案--------------------------------------------------------
private OrderType ordertype = OrderType.asc;
public enum OrderType{asc,desc}private OrderType ordertype;