Re: Enums vs static final Strings



On Wed, 22 Aug 2007 11:39:03 +0100, RedGrittyBrick
<redgrittybrick@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted
someone who said :

if (ButtonName.OTHER.toString().equals(command))

Try the valueOf method that converts a String to an enum.

once you have the enum, you have access to all the values declared in
the Enum constant definition, plus all the enum methods, plus all the
enum methods specific to that enum.

See http://mindprod.com/jgloss/enum.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.