Enum is a class object?

From what I understand, an enum is a very limited class.

My question is, what performance benefits does an enum have over a class?
How big is an enum over a class?

Enum is just a bit of syntactical sugar to make a very common pattern more easy to code. It’s no faster.

Cas :slight_smile:

Seen this? Looks cool…

http://weblogs.java.net/blog/ryano/archive/2005/01/implementing_th_1.html

[quote]Seen this? Looks cool…

http://weblogs.java.net/blog/ryano/archive/2005/01/implementing_th_1.html
[/quote]
AHEM

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=GameDesign;action=display;num=1107594053

Can design patterns increase performance considerably?

[quote]Can design patterns increase performance considerably?
[/quote]
Design patterns are not about performance. Just think of them of tactics for solving common design problems. Using them leads to well structured, maintainable and expandable code. Not necessarily a performance boost. Maybe you’d be interested to read the book “Design patterns for Java”.

LOL!! Very interesting statement though :slight_smile:

Umm, well isn’t that the idea behind design patterns, having a set of good constructs for solving common design problems? ???