Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which of these exceptions will be thrown if we use null reference for an arithmetic operation?

a) ArithmeticException
b) NullPointerException
c) IllegalAccessException
d) IllegalOperationException

Answer: b
Explanation: If we use null reference anywhere in the code where the value stored in that reference is used then NullPointerException occurs.

Join The Discussion