public enum WeekDay{ RED (30) {public .........................}
GREEN(40) {public .................}
public abstract TrafficLamp netLamp();
private TrafficLamp(int time){
this.time = time ;
}
}
我想问,定义的属性中 传的参数 如:RED(30) 这个参数除了调用有参的构造方法外,在枚举中还有其他没作用???
|
|