Discussion & Examples: Java enums versus public static final

Discussion & Examples: Java enums versus public static final

Note: This article will be emailed to your friend.

Should we use to represent a constant String such as browser’s user agent or simply use public static final String as before?
Using public static final as enum has many problems, such as:

Not typesafe - Since a type is just an int you can pass in any other int value where a particular type is required, [...]

Read the rest of this article (450 words)

Please fill in the following fields

* - Required

Your Name: *

Your E-Mail: *

Your Remarks:

Friend's Name: *

Friend's E-Mail: *

Protected by Comment Guard Pro