
- Hibernate Tutorial
- Hibernate - Home
- ORM - Overview
- Hibernate - Overview
- Hibernate - Architecture
- Hibernate - Environment
- Hibernate - Configuration
- Hibernate - Sessions
- Hibernate - Persistent Class
- Hibernate - Mapping Files
- Hibernate - Mapping Types
- Hibernate - Examples
- Hibernate - O/R Mappings
- Hibernate - Annotations
- Hibernate - Query Language
- Hibernate - Criteria Queries
- Hibernate - Native SQL
- Hibernate - Caching
- Hibernate - Batch Processing
- Hibernate - Interceptors
- Hibernate Useful Resources
- Hibernate - Questions and Answers
- Hibernate - Quick Guide
- Hibernate - Useful Resources
- Hibernate - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Hibernate Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Hibernate Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q 1 - Which of the following tools/frameworks provides integration with Hibernate?
Answer : D
Explaination
All of the above provide integration with Hibernate.
Q 2 - Which of the following is true about configuration component of Hibernate?
A - The Configuration object is the first Hibernate object you create in any Hibernate application.
B - The Configuration object is usually created only once during application initialization.
Answer : D
Explaination
The Configuration object is the first Hibernate object you create in any Hibernate application and usually created only once during application initialization. It represents a configuration or properties file required by the Hibernate.
Q 3 - Session.createQuery creates a new instance of Query for the given HQL query string.
Answer : A
Explaination
Session.createQuery creates a new instance of Query for the given HQL query string.
Q 4 - Which method is used to save the state of the given instance from the underlying database?
Answer : C
Explaination
Session.save saves the state of the given instance from the underlying database.
Q 5 - Which of the following element maps java.util.Collection property in hibernate?
Answer : C
Explaination
java.util.Collection property is mapped with a <bag> or <ibag> element and initialized with java.util.ArrayList.
Q 6 - What is the difference between save() and persist() methods of session object?
B - save saves the object and returns status whereas persist stores status in different variable.
Answer : C
Explaination
save saves the object and returns the id of the instance whereas persist do not return anything after saving the instance.
Q 7 - What is second level cache in hibernate?
Answer : A
Explaination
The second-level cache is the SessionFactory based cache and is mainly responsible for caching objects across sessions.
Q 8 - Which of the following is true about hibernate?
A - Hibernate does not require an application server to operate.
B - Hibernate manipulates Complex associations of objects of your database.
C - Hibernate minimize database access with smart fetching strategies.
Answer : D
Explaination
All of the above are true with respect to hibernate.
Q 9 - Which of the following is true about hibernate annotations?
Answer : A
Explaination
Hibernate Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping. All the metadata is clubbed into the POJO java file along with the code this helps the user to understand the table structure and POJO simultaneously during the development.
Q 10 - length attribute of @Column annotation permits the size of the column used to map a value particularly for a String value.
Answer : B
Explaination
length attribute of @Column annotation permits the size of the column used to map a value particularly for a String value.