Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private ArrayList<Amigo> amigosAgendados;
- public boolean addAmigo(Amigo amigo) {
- if(amigo == null){
- throw new IllegalArgumentException("Amigo nulo.");
- }
- if (!amigosAgendados.contains(amigo)){
- amigosAgendados.add(amigo);
- return true;
- }
- return false;
- }
Add Comment
Please, Sign In to add comment