I am trying to learn Java from below, and I've got this good book to read. Now I have found an example in the book about declaring Enums inside a class, but out of any way I gave it a shot:
Enum CoffeeSize {BIG, HUGE, OVERWHELMING };
Spelling it in the book enum
and give me this compiled message syntax error, insert ""; To complete blockstations
Are all these important anomes? I mean, should I leave it or is it possible that I use those days?
This is the correct way to declare a enum
inside a class:
public class main {enum fu {one, two, three} public static zero chief {string} [] [System.out.println (Foo.One); }}
You use the keyword enum
, not Enum
, which is the best of all enum
Class is example
Comments
Post a Comment