Kimes

Untitled

Mar 29th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. @Override
  2.     public boolean equals(Object arg0) {
  3.         if (Book.class.isInstance(arg0)) {
  4.        
  5.         return this.author.equals(((Book) arg0).author) &&
  6.                 this.year.equals(((Book) arg0).year) &&
  7.                 this.title.equals(((Book) arg0).title);
  8.         }
  9.         return false;
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment