Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean ancestraisComuns(Burro burro, Burro burra){
- if(burro.getFather() != null || burro.getMother() != null){
- verificacao(burro,burra);
- }
- return ancestraisComuns(burro,burra);
- }
- public boolean verificacao(Burro burro, Burro burra){
- if(burro.getFather().equals(burra.getFather())
- || burro.getMother().equals(burra.getMother())) {
- return true;
- } else {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement