Multiple choice technology architecture

Which of the following statements are correct w.r.t. entity bean?

  1. Every entity must have a primary key

  2. It is not necessary to define primary key for an Entity

  3. @Primary annotation is used for denoting a simple primary key

  4. All the above

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

Every entity in JPA/EJB must have a primary key that uniquely identifies each persistent instance. This is a fundamental requirement of the entity specification - primary keys can be simple or composite, but an entity cannot exist without one. Option B is incorrect because primary keys are mandatory.