Question: Suppose that p is a reference variable that contains the null reference. What happens at runtime if the program tries to activate a method of

 Suppose that p is a reference variable that contains the null

Suppose that p is a reference variable that contains the null reference. What happens at runtime if the program tries to activate a method of p? String p; p. sub String (0, 6); Null Pointer Exception Illegal Argument Exception Illegal Static Exception The results are unpredictable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!