Here I've used the new keyword enum, given the enum a name, and specified the allowed values. Grade then becomes an enumerated type, which you can use in a manner shown in Listing 3.
在这里,我使用了新的关键字enum,为enum提供了一个名称,并指定了允许的值。
This illustrates how both the name and integer value of the Enum instance are readily available.
这说明了单位的名称及整数枚举实例的值都是现成的。
This illustrates how both the name and integer value of the Enum instance are readily available.
这说明了单位的名称及整数枚举实例的值都是现成的。
应用推荐