Created
August 9, 2017 13:06
-
-
Save rafaelvicio/71b6342f3ae34a67597b8033afec46d4 to your computer and use it in GitHub Desktop.
ClassesImutaveisComObjetosMutaveis
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 Aula { | |
private final Calendar inicio; | |
private final Calendar fim; | |
public Aula(Calendar inicio, Calendar fim){ | |
this.inicio = (Calendar) inicio.clone(); | |
this.fim = (Calendar) fim.clone(); | |
} | |
public Calendar getInicio(){ | |
return (Calendar) inicio.clone(); | |
} | |
public Calendar getFim(){ | |
return (Calendar) fim.clone(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment