Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 44

Which of these can be a JPA entity?

    Correct Answer: D

    A JPA entity must be an instantiable class and it cannot be an abstract class, an interface, or an enum type. It can be a final class because final keyword only restricts the inheritance but does not affect the ability to instantiate the class. Therefore, a JPA entity can be a final class.

Discussion
kozionovOption: B

B https://docs.oracle.com/javaee/7/tutorial/persistence-intro002.htm#BNBQN

devmsalehOption: B

B is the correct Answer

orjavaOption: B

Correct is B. - Must have @Entity. - Must have public or protected no-arg constructor. - Must be a top-level class but can be a concrete or an abstract class. - Must not be final, Interface or Enum.