My first step is to create a new type that defines all the moods to track. This is easily done using a Java 5 enumeration type, as shown in Listing 3.
我的第一步是创建一个新类型,用于定义要跟踪的所有情绪。
And any enumeration type based on a CLS-compliant base integer type.
以及任何基于符合CLS的基础整数类型的枚举类型。
An enumeration type (also named an enumeration or an enum) provides an efficient way to define a set of named integral constants that may be assigned to a variable.
枚举类型(也称为枚举)为定义一组可以赋给变量的命名整数常量提供了一种有效的方法。
An enumeration type (also named an enumeration or an enum) provides an efficient way to define a set of named integral constants that may be assigned to a variable.
枚举类型(也称为枚举)为定义一组可以赋给变量的命名整数常量提供了一种有效的方法。
应用推荐