Salesforce Apex and Visualforce Controllers (DEV-501) Free Practice Test
Question 1
A text area input element. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object, for a value that requires a text area.
Correct Answer: A
Question 2
Which of the following statements identifies the block of code that can handle a particular exception?
-catch -finally -try -throw
-catch -finally -try -throw
Correct Answer: D
Question 3
In a recruiting application, a Position custom object is related to a Salary custom object. Sensitive information, such as current salary, is stored on the Salary object. All users should be able to at least view position information. However, only select individuals should be able to read salary records.
How should a developer accomplish this?
How should a developer accomplish this?
Correct Answer: C
Question 4
A label for an input or output field. Use this component to provide a label for a controller method that does not correspond to a field on a Salesforce object.
Correct Answer: A
Question 5
Which of the following guidelines are used for creating custom Web Services? (Select all that
apply.)
-webservice methods must be static.-webservice methods cannot be overloaded.-A system-defined enum can be used anywhere in a webservice method.-All classes that contain methods defined with the webService keyword must be declared as
private.
apply.)
-webservice methods must be static.-webservice methods cannot be overloaded.-A system-defined enum can be used anywhere in a webservice method.-All classes that contain methods defined with the webService keyword must be declared as
private.
Correct Answer: A,B,C,D
Question 6
How do you call Web Services from external sources? (No Answer)
Correct Answer: D
Question 7
Which of the following are collection data types?
-String -Map -List -Date -Set -Number
-String -Map -List -Date -Set -Number
Correct Answer: B
Question 8
An HTML input element of type text. Use this component to get user input for a controller method that does not correspond to a field on a Salesforce object.
This component does not use Salesforce styling. Also, since it does not correspond to a field, or any other data on an object, custom code is required to use the value the user inputs.
This component does not use Salesforce styling. Also, since it does not correspond to a field, or any other data on an object, custom code is required to use the value the user inputs.
Correct Answer: D
Question 9
What does Apex use to record disruptions in code execution?
Correct Answer: A
Question 10
A definition of an attribute on a custom component. The attribute tag can only be a child of a component tag.
Note that you cannot define attributes with names like id or rendered. These attributes are automatically created for all custom component definitions.
Note that you cannot define attributes with names like id or rendered. These attributes are automatically created for all custom component definitions.
Correct Answer: A
Question 11
A component that creates an input field to upload a file.
Note: The maximum file size that can be uploaded via Visualforce is 10 MB.
Note: The maximum file size that can be uploaded via Visualforce is 10 MB.
Correct Answer: B
Question 12
A data series to be rendered as connected points in a Visualforce chart. At a minimum you must specify the fields in the data collection to use as X and Y values for each point, as well as the X and Y axes to scale against.
Note: This component must be enclosed within an <apex:chart> component. You can have multiple <apex:barSeries> and <apex:lineSeries> components in a single chart.
Note: This component must be enclosed within an <apex:chart> component. You can have multiple <apex:barSeries> and <apex:lineSeries> components in a single chart.
Correct Answer: C
Question 13
How should one prevent soql injection when using dynamic soql?
Correct Answer: A