Re: In praise of Java 1.5 enums



"farseer" <farseer@xxxxxxxxxxxxx> writes:

> i have always written my own enum classes that maintain a hashtable to
> ensure only one instance of any enum constant is instantiated. how
> does the new classes help?

It doesn't give you any new functionality, just a shorter syntax.
Behind the scene, enum classes are compiled into type-safe enum
classes.

/L
--
Lasse Reichstein Nielsen - lrn@xxxxxxxxxx
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
.