15 Sep Create New Enum in Eclipse
Enum has fixed set of constants, which improves type safety. It is a datatype consisting of a set of named values. Let’s see how to create new Enum in Eclipse.
Launch Eclipse and click the File menu,
File > New > Enum
After clicking Enum above, a new dialog box will open. This section provides you with options to create new Enum.
The following options are provided while creating Enum in Eclipse.
Mention the source folder for the enum or click Browse to select a source folder via a dialog.
Mention the package here, in which the new enumgets added. Go for this option or select the Enclosing Type option.
Select a type here, to enclose the new enum. Select this or the Package option above.
You need to type the name of the new enum here.
Select modifiers: public, private, protected. You need to select one or more access modifiers for the new enum.
Choose interfaces by clicking Add, which the new interface extends.
Do you want to add comments?
Select the option, if you want the comments to be added to the new class.