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:A
Which of these exceptions will be thrown if we use null reference for an arithmetic operation?
A. ArithmeticException B. NullPointerException C. IllegalAccessException D. IllegalOperationException
Explanation: If we use null reference anywhere in the code where the value stored in that reference is used then NullPointerException occurs.