Enums in java compile error

Posted by London on Stack Overflow See other posts from Stack Overflow or by London
Published on 2010-05-16T00:00:17Z Indexed on 2010/05/16 0:10 UTC
Read the original article Hit count: 135

Filed under:

Hi, I'm trying to learn java from bottom up, and I got this great book to read http://www.amazon.com/o/ASIN/0071591060/ca0cc-20 . Now I found example in the book about declaring Enums inside a class but outside any methods so I gave it a shot :

Enum CoffeeSize { BIG, HUGE, OVERWHELMING }; 

In the book its spelled enum and I get this compile message Syntax error, insert ";" to complete BlockStatements

Are the Enums that important at all?I mean should I skip it or its possible that I will be using those some day?

© Stack Overflow or respective owner

Related posts about java