Which exception is thrown in Java when a class is not found at runtime while…

PYQ IBPS SO CRP SPL-XV (2025)Modified — slightly modified from the official paper; see the solution

Which exception is thrown in Java when a class is not found at runtime while loading it by name (for example, with Class.forName())?

  1. A.

    NullPointerException

  2. B.

    ClassNotFoundException

  3. C.

    IOException

  4. D.

    ArithmeticException

  5. E.

    NoClassDefFoundError

Attempted by 34 students.

Sign up free to check your answer

Sign up free

Explore the full course: Ibps So It Mains

Loading lesson…