Hibernate MCQs with answers Page - 1

Here, you will find a collection of MCQ questions on Hibernate. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

S

Satya • 3.38K Points
Extraordinary

Q. What is Hibernate?

  • (A) A database
  • (B) An ORM (Object Relational Mapping) framework for Java
  • (C) A web server
  • (D) A programming language

S

Satya • 3.38K Points
Extraordinary

Q. ORM stands for?

  • (A) Object Relation Model
  • (B) Object Relational Mapping
  • (C) Operational Resource Management
  • (D) Object Resource Manager

S

Satya • 3.38K Points
Extraordinary

Q. Which file is used for Hibernate configuration?

  • (A) hibernate.cfg.xml
  • (B) web.xml
  • (C) config.xml
  • (D) persistence.xml

S

Satya • 3.38K Points
Extraordinary

Q. Which interface is used to interact with the database in Hibernate?

  • (A) Session
  • (B) Connection
  • (C) DriverManager
  • (D) Statement

S

Satya • 3.38K Points
Extraordinary

Q. Which method saves an object in Hibernate?

  • (A) insert()
  • (B) save()
  • (C) add()
  • (D) store()

S

Satya • 3.38K Points
Extraordinary

Q. Which method updates an existing record?

  • (A) modify()
  • (B) update()
  • (C) change()
  • (D) refresh()

S

Satya • 3.38K Points
Extraordinary

Q. Which method removes an object from the database?

  • (A) remove()
  • (B) delete()
  • (C) drop()
  • (D) erase()

S

Satya • 3.38K Points
Extraordinary

Q. Which method retrieves an object by primary key?

  • (A) fetch()
  • (B) get()
  • (C) find()
  • (D) select()

S

Satya • 3.38K Points
Extraordinary

Q. Which method loads an object lazily?

  • (A) get()
  • (B) load()
  • (C) fetch()
  • (D) read()

S

Satya • 3.38K Points
Extraordinary

Q. Which object is responsible for creating Session objects?

  • (A) Configuration
  • (B) SessionFactory
  • (C) Transaction
  • (D) Query

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ