You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Some examples (inspired by the Java Enum Tutorial):
Or with a bit of refactoring, you could write the switch like this:
Here is a coin example:
Here is a planet example:
Powered by a free Atlassian Confluence Open Source Project License granted to Codehaus. Evaluate Confluence today.