I have enum class like this:
REGULARLY("Regularly"),
SOCIALLY("Socially"),
RARELY("Rarely"),
NEVER("Never");
private final String name;
Drink(String s) {
name = s;
}
How to get value of enum field by its position. For example for position 0 output should be "Regularly". NOT THE "REGULARLY"