Multiple choice technology programming languages

Which of the following are mandatory when writing a POJO class?

  1. Implement a no-argument constructor

  2. provide an identifier property

  3. declare accessors for persistent fields

  4. all the above

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

Hibernate requires a no-argument constructor to instantiate objects via reflection when retrieving data from the database. While identifier properties and accessors are best practices, they are not mandatory for basic POJO functionality.