--:--









Quiz for JPA (Java Persistence API)

Course: JAVA | Subject: Java | Topic: Java Enterprise Edition



Logo

Q1: What does JPA stand for?

Logo

Q2: Which annotation marks a class as a JPA entity?

Logo

Q3: Which annotation is used to define the primary key in a JPA entity?

Logo

Q4: Which annotation is used to define column mapping in JPA?

Logo

Q5: Which class is used to manage persistence in JPA?

Logo

Q6: Which method is used to save an entity in JPA?

Logo

Q7: Which file defines the persistence unit in JPA?

Logo

Q8: What is a persistence unit?

Logo

Q9: Which annotation is used to generate values for primary key automatically?

Logo

Q10: Which method is used to retrieve an entity by its ID?

Logo

Q11: Which annotation is used to create a one-to-many relationship?

Logo

Q12: Which JPA feature caches entities during a transaction?

Logo

Q13: What does @Transient annotation do?

Logo

Q14: Which lifecycle callback is invoked before entity removal?

Logo

Q15: What is the purpose of @JoinColumn annotation?

Logo

Q16: Which method removes a managed entity from the database?

Logo

Q17: Which annotation is used for optimistic locking?

Logo

Q18: Which exception is thrown when an entity is not found?

Logo

Q19: Which annotation defines the table name explicitly?

Logo

Q20: Which annotation is used to define a native SQL query?

Are you ready to start test? Set your time limit