When a Java array will throw NullPointerException?
Answers
Answered by
0
A null pointer exception is thrown Whenever you try to
Call the instance method of a null object.
Access, modify, print, a null value.
Trying to access (print/use in statements) the length of the null value.
Throw a null value.
Access an element of an array without initializing it.
Then, a Null Pointer Exception will be thrown.
Plz mark as brainlist......
Answered by
0
NullPointerException is thrown when an application attempts to use an object reference that has the null value. These include: Calling an instance method on the object referred by a null reference.
Similar questions