阅读背景:

将enum类作为参数传递给java中的方法

来源:互联网 

I have two different Enums:

我有两个不同的枚举:

public enum A { 
    mass(10); // many other values omitted for clarity

    private final int m;

    private A(int m) { this.m = m; }

    public int value() { return this.m; }

}

public enum B {
    mass(100); // many other values omitted for clarity

    private final int m;

    private B(int m) { this.m = m; }

    public int value() { return this.m; }
}
publ



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: