java enum get first element code example Example: java enum get first element YOUR_ENUM.values()[index]