Peter Lawrey writes about Two Uses of Enums that most people forget on his blog.
First of all, I hadn't forgotten - I hadn't even realised :)
These approaches are nice and concise - are there any benefits other than conciseness compared with the more traditional ways of achieving the same thing, such as using final
classes with private
constructors for utility classes?
Also, are there any issues (apart from confusing programmers who aren't expecting it)?