Home

This Chapter
-Appendix A: Enums
-Introduction to enum
-Enums in a Class
-The java.lang.Enum Class
-Iterating over Enumerated Values
-Switching on Enum

Table of Contents
-Introduction
-Chapter 1: Core Libraries
-Chapter 2: Dynamic Compilation
-Chapter 3: Scripting
-Chapter 4: Networking
-Chapter 5: Swing Updates
-Chapter 6: Abstract Window Toolkit
-Chapter 7: Internationalization
-Chapter 8: Java Database Connectivity 4.0
-Chapter 9: XML Digital Signature API
-Chapter 10: Streaming API for XML
-Chapter 11: Java Architecture for XML Binding
-Chapter 12: Web Services
-Chapter 13: JavaBeans Activation Framework
-Chapter 14: User-Defined MXBeans
-Chapter 15: Concurrency Updates
-Appendix A: Enums
-Appendix B: Generics
-Appendix C: Annotations

Previous
Next

 

Appendix A

Enums

Java 5 added a new type, enum, for enumerating values. With this new type, you can say goodbye to static final fields that so far have been used as constants. However, enum is much more than a substitute for static finals and this appendix presents this new type in detail.

Previous
Next