Home » JAVA Programming » Exceptions » Question
  1. Which of these exceptions will be thrown if we use null reference for an arithmetic operation?
    1. IllegalAccessException
    2. ArithmeticException
    3. IllegalOperationException
    4. NullPointerException
    5. None of these
Correct Option: D

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



Your comments will be displayed only after manual approval.