Skip to content

Instantly share code, notes, and snippets.

@rafaelvicio
Created August 9, 2017 13:06
Show Gist options
  • Save rafaelvicio/71b6342f3ae34a67597b8033afec46d4 to your computer and use it in GitHub Desktop.
Save rafaelvicio/71b6342f3ae34a67597b8033afec46d4 to your computer and use it in GitHub Desktop.
ClassesImutaveisComObjetosMutaveis
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