Salesforce Certified Platform Developer II — Question 35

A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page.
Which component should be added to the Visualforce page to display the message?

Answer options

Correct answer: D

Explanation

The <apex:pageMessages /> component is specifically designed to render messages that have been added via the ApexPages.addMessage() method. The other options either do not serve this specific purpose or are not intended to display general messages added in this manner.