I\'m trying to add the below book objects to a TreeSet. However, when I debug the code, it says that the set has a size of 1 and only contains the first object added (book1). Wh
All books are equal to one another (evident by returning 0). A Set
cannot contain duplicates, so that's why only one (the first Book) is ever added
@Override
public int compareTo(Book o) {
// TODO Auto-generated method stub
return 0;
}
You need to fill in the details of the method. Negative numbers say this
book is less than o
, vice versa for positive numbers