Why and what for: java enum

Posted by Mat Banik on Stack Overflow See other posts from Stack Overflow or by Mat Banik
Published on 2011-01-17T00:58:45Z Indexed on 2011/01/17 3:53 UTC
Read the original article Hit count: 219

Filed under:
|

Today I was browsing through some question on this site and I found mention of enum being used in singleton pattern and that there are some thread safety benefits to such solution.

I never used enums and I have been programing in java for more than couple a years now. And apparently they changed a lot and now they even do full blown support of OOP within them selfs.

Now why and what for should I used enum in day to day programing?

© Stack Overflow or respective owner

Related posts about java

Related posts about enums