> For the complete documentation index, see [llms.txt](https://edward-stevinson.gitbook.io/tech-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edward-stevinson.gitbook.io/tech-notes/java/enum.md).

# Enum

Enums in Java are type-safe and have their own namespace.

## API

`name()`

The method returns the name of the enum constant, exactly as declared in its enum declaration.
