What is the difference between NullPointerException and NullReferenceException?
3 Answers
NullPointerException - The Java exception thrown when an application attempts to use null in a case where an object is required.
NullReferenceException - The exception that is thrown when there is an attempt to reference (or use) a null or uninitialized object.
There is no 'NullReferenceException' in Java. Java has an equivalent class 'NullPointerException'.