September 2002
Intermediate to advanced
608 pages
14h 20m
English
The Division and Conference classes represent enumerated types. Although the way these classes were developed in Chapter 2 worked well, there is a Java idiom for doing enumerated types that is superior to using integer constants. Listing 3.1 shows how this idiom (described in the following sidebar) has been applied to the Conference class; the corresponding changes have also been made to the Division class.
The Enumerated Type IdiomBasic Usage In our original application, we used static int or String types to assign constant values to several variables that collectively made up an enumerated type (we did this for Conferences, Divisions, and for the Status fields within the Team class). A superior ... |
Read now
Unlock full access