Multiple choice technology web technology

How to create SessionFactory ?

  1. configuration.buildSessionFactory();

  2. configuration.createSessionFactory();

  3. configuration.createNewSessionFactory();

  4. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To create a SessionFactory in Hibernate, you call the buildSessionFactory() method on a Configuration object. The typical pattern is: SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();