Java EE 7 Application Developer — Question 21
Which of these can be a JPA entity?
Answer options
- A. Enum type
- B. Abstract class
- C. Interface type
- D. Final class
Correct answer: A
Explanation
An Enum type can be a JPA entity because it can be mapped to a database table. In contrast, an Abstract class cannot be instantiated, an Interface type does not provide an implementation, and a Final class cannot be subclassed, making them unsuitable as JPA entities.