Java: How To Use Enum in Switch

Java: How To Use Enum in Switch

Note: This article will be emailed to your friend.

When using enums in a switch, it is almost natural to assume they will be used like a regular switch. Unfortunately to accomodate enums, Java had to enhance its specification and enums in switch behave differently than regular switch statements in two significant and non-trivial ways.

Sun’s Javac says -”enum switch case label must be the [...]

Read the rest of this article (198 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