Yes, but you may prefer enum which implements an interface, Look here. I think It looks much better. This is example for abstract method:
public enum Animal {
CAT {
public String makeNoise() { return "MEOW!"; }
},
DOG {
public String makeNoise() { return "WOOF!"; }
};
public abstract String makeNoise();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…