| Author |
BJO - enum - what special to OO ????
|
ankur rathi
Ranch Hand
Joined: Oct 11, 2004
Posts: 3829
|
|
Hi Jacquie, You were talking about enum in 'OO advantage of Java 5' post. Really, first time I understand the need of enum. But where OO comes into picture. I mean why the title was 'OO advantage of Java 5'?? Please comment on this.. Thanks a lot.
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
An enum is allowed to have polymorphic behaviour - that is, methods that are implemented differently for each enum value. Contrast this with public static int fields, which are the most common alternative...
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
Jacquie Barker
author
Ranch Hand
Joined: Dec 20, 2000
Posts: 201
|
|
Originally posted by rathi ji: Hi Jacquie, You were talking about enum in 'OO advantage of Java 5' post. Really, first time I understand the need of enum. But where OO comes into picture. I mean why the title was 'OO advantage of Java 5'?? Please comment on this.. Thanks a lot.
I was a bit loose with my wording in that post ... I should have stated it more along the lines of the key advantages, from a software principles perspective, of Java 5 ... please see how I've gently reworded it. Best, J. [ July 13, 2005: Message edited by: Jacquie Barker ]
|
Author of Beginning Java Objects, Beginning C# Objects, and Taming the Technology Tidal Wave
|
 |
 |
|
|
subject: BJO - enum - what special to OO ????
|
|
|