Which of the following are tags of hibernate.cfg.xml?

  1. mapping file

  2. mapping-file

  3. session-factory

  4. session


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) mapping file - This option is incorrect because it is not a valid tag in hibernate.cfg.xml.

Option B) mapping-file - This option is incorrect because it is not a valid tag in hibernate.cfg.xml.

Option C) session-factory - This option is correct because `` is a valid tag in hibernate.cfg.xml. It is used to configure the session factory, which is responsible for creating sessions to interact with the database.

Option D) session - This option is incorrect because it is not a valid tag in hibernate.cfg.xml.

The correct answer is C) session-factory. This option is correct because `` is a valid tag in hibernate.cfg.xml.

Find more quizzes: