Last active
March 9, 2020 23:24
-
-
Save gdonega/f0f3b50ca0db0ac46a907c53035c22a9 to your computer and use it in GitHub Desktop.
Java - Enum: exemplo
This file contains hidden or 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
public enum TipoJogo { | |
ACAO("Ação"), AVENTURA("Aventura"), RPG("Role-playing game"); | |
private String descricao; | |
private TipoJogo(String descricao) { | |
this.descricao = descricao; | |
} | |
public String getDescricao() { | |
return descricao; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment