devxlogo

February 23, 2018

Usage of a Custom Ordinal in Enum

The getCustomValue() method on the enum returns the custom value associated. You can use this mechanism when you want to override the default ordinal with a custom ordinal. Code snippet public