Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Exam PDII All Questions
Exam PDII All Questions

View all questions & answers for the PDII exam

Salesforce Developers PDII Question # 51 Topic 6 Discussion

PDII Exam Topic 6 Question 51 Discussion:
Question #: 51
Topic #: 6

A page throws an ‘Attempt to dereference a null object’ error for a Contact.

What change in the controller will fix the error?


A.

Declare a static final Contact at the top of the controller.


B.

Use a condition in the getter to return a new Contact if it is null.

G Change the setter’s signature to return a Contact.


C.

Change the getter's signature to be static Contact.


Get Premium PDII Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.