Java Basic


  1. Which of the following method is used inside session only?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    update() method can only be used inside session. update() should be used if session does not contain persistent object.


  1. Which of the following methods hits database always?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    get() method hits database always. Also, get() method does not return proxy object.



  1. Which of the following methods returns proxy object?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    load() method returns proxy object. load() method should be used if it is sure that instance exists.


  1. SessionFactory is a thread-safe object.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    SessionFactory is a thread-safe object. Multiple threads can access it simultaneously.



  1. Which of the following is not a core interface of Hibernate?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    SessionManagement is not a core interface of Hibernate. Configuration, Criteria, SessionFactory, Session, Query and Transaction are the core interfaces of Hibernate.