- 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
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 is not a core component of Hibernate?
Answer : A
Explaination
JDBC is not a core component of Hibernate.
Q 2 - Which of the following is true about SessionFactory object in hibernate?
B - SessionFactory object allows for a Session object to be instantiated.
Answer : D
Explaination
SessionFactory object configures Hibernate for the application using the supplied configuration file and allows for a Session object to be instantiated. The SessionFactory is a thread safe object and used by all the threads of an application.
Q 3 - Session.createCriteria creates a new Criteria instance, for the given entity class, or a superclass of an entity class.
Answer : A
Explaination
Session.createCriteria creates a new Criteria instance, for the given entity class, or a superclass of an entity class.
Q 4 - Which method is used to update the state of the given instance from the underlying database?
Answer : C
Explaination
Session.update updates 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 lazy loading?
A - Lazy loading is a technique in which objects are loaded on demand basis.
B - Lazy loading is a technique in which objects are persisted on demand basis.
Answer : A
Explaination
Lazy loading is a technique in which objects are loaded on demand basis.
Q 7 - What HQL stands for?
Answer : A
Explaination
HQL stands for Hibernate Query Language.
Q 8 - Which of the following is a concurrency strategies in hibernate?
Answer : D
Explaination
All of the above are concurrency strategies in hibernate.
Q 9 - Which of the following is true about @Id annotation?
A - Hibernate detects that the @Id annotation is on a field.
Answer : C
Explaination
Hibernate detects that the @Id annotation is on a field and assumes that it should access properties on an object directly through fields at runtime.
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.
To Continue Learning Please Login
Login with Google