public boolean equals (Object obj){
if (this == obj){
return true;
}else{
if(obj instanceof Book) {
Book book = (Book) obj;
if(name.equals(book.getName())&& author.equals(book.getAuthor())) {
return true;
}
}
return false;
}
What does Book book = (Book) obj;
mean?
Is it different from new
?