Created
August 9, 2017 12:11
-
-
Save rafaelvicio/0b6d302b37ded92a544d6478962bb1b6 to your computer and use it in GitHub Desktop.
Exemplo classe imutável no Java
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
public final class Aluno { | |
private final String nome; | |
public Aluno(String nome){ | |
this.nome = nome; | |
} | |
public String getNome() { | |
return this.nome; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment