[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] enum type value initialization

Hi there,
is there any way I can initialize my enum values to arbitrary values like the way we do it in C++? this is what I mean. I need to have a code like this.


enum Size{SMALL = 0, MEDIUM = 3, LARGE = 5};

this is possible in C++. What is the java way to do this. java 5 supports enum types but I couldn't have the above initialization.