我想采用现有的枚举并添加更多元素,如下所示:
enum A {a,b,c} enum B extends A {d} /*B is {a,b,c,d}*/
这在Java中可行吗?
java enums
enums ×1
java ×1