Prev Next

Java / Enum

What is enum ordinal in java?

ordinal method returns the ordinal of this enumeration constant, its position in its enum declaration, where the initial constant is assigned an ordinal of zero. Most developers will have minimal use for this method. It is designed for use by sophisticated enum-based data structures, such as EnumSet, EnumMap and compareTo method.

More Related questions...

Show more question and Answers...


Comments & Discussions