Multiple choice technology programming languages

What does session.load() return if there is no matching database row ?

  1. a) NULL

  2. b) Empty Object

  3. c) unrecoverable exception

  4. d) None of the above

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

In Hibernate, session.load() returns a proxy object immediately without hitting the database. When you attempt to access a property on this proxy, if no matching row exists, it throws an unrecoverable ObjectNotFoundException.