If you intend to put instances of persistent classes in a Set, you have to

  1. Override equals() method

  2. Override hashCode() method

  3. Both a and b

  4. Neither a nor b


Correct Option: C

Find more quizzes: