Created
May 5, 2021 18:31
-
-
Save filiperdt/1cdad14a9107cb8c67480270046ad431 to your computer and use it in GitHub Desktop.
Enum function to print values with the first capital letter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public String toString() { | |
return Character.toUpperCase(name().charAt(0)) + name().toLowerCase().substring(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment