Multiple choice technology web technology

Which of the following must be satisfied by a component class?

  1. Implements java.io.Serializable

  2. Override equals() method

  3. Override hashCode() method

  4. Both a, b and c

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Component classes require implementing Serializable for persistence/caching, and must override equals() and hashCode() for proper behavior in collections and as cache keys. All three requirements are mandatory for component classes in frameworks like Hibernate.