I've just fix the problem! I've changed the code in this way:
-------------------------------------------------------
@Override
public boolean equals(Object o) {
if (o==this)
return true;
if (o instanceof Book) {
if (this.isbn.compareTo(((Book) o).getIsbn()) == 0)
return true;
else return false;
}
return false;
}
-------------------------------------------------------
The problem was the comparison between string! Now I use the compareTo() method and everything correctly works.
Thank you for your time Piotr!