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?
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
[quote]Seen this? Looks cool…
http://weblogs.java.net/blog/ryano/archive/2005/01/implementing_th_1.html
[/quote]
AHEM
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
Umm, well isn’t that the idea behind design patterns, having a set of good constructs for solving common design problems? ???