ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Enums in Java (One More Time)
Subject:   switch or 'enums as objects'
Date:   2003-04-28 04:34:15
From:   pverkest
I like the enums-as-objects, because it forces me to use objects and to think OO. It happened quite often that I introduced an enum-as-object and in a later phaze, added behavior to the enum.
What's called 'Seamless Integration with Other Language Features' in the article seems to be not OO at all: in stead of using polymorphism and implementing a method on all days, a switch is preferred.
----
Peter Verkest

1 to 1 of 1
1 to 1 of 1