If you intend to put instances of persistent classes in a Set, you have to
Override equals() method
Override hashCode() method
Both a and b
Neither a nor b