SALESFORCE CERTIFICATIONS DEV-450Salesforce Certified Platform Developer I - Practice Questions - Post 16

#Advertisement

SALESFORCE CERTIFICATIONS DEV-450Salesforce Certified Platform Developer I - Practice Questions - Post 16

1. Which control statement should a developer use to ensure that a loop body executes at least once?

Page: Page 31

Option A: For(variable : list_or_set){}

Option B: While (condition){}

Option C: For(init_stmt;exit_cond;increment){}

Option D: Do {} while (cond)

Answer(s): 4

Explanation: Not available

SEO Keywords: SEO keywords not available


2. Which three data types can be returned from an SOQL statement?

Page: Page 31

Option A: Boolean

Option B: List of objects

Option C: String

Option D: Integer

Answer(s): 2,4,5

Explanation: Not available

SEO Keywords: SEO keywords not available


3. Which two components are available to deploy using the METADATA API? Choose 2 answers

Page: Page 31

Option A: Web-to-Case

Option B: Lead Conversion Settings

Option C: Case Settings

Option D: Web-to-Lead

Answer(s): 2,3

Explanation: Not available

SEO Keywords: SEO keywords not available


4. A developer has the following class and trigger code: public class InsuranceRates { public static final Decimal smokerCharge = 0.01; } trigger ContactTrigger on Contact (before insert) { InsuranceRates rates = new InsuranceRates(); Decimal baseCost = XXX; } Which code segment should a developer insert at the XXX to set the baseCost variable to the value of the class variable smokerCharge?

Page: Page 31

Option A: Rates.smokerCharge

Option B: Rates.getSmokerCharge()

Option C: ContactTrigger.InsuranceRates.smokerCharge

Option D: InsuranceRates.smokerCharge

Answer(s): 4

Explanation: Not available

SEO Keywords: SEO keywords not available


5. A developer creates a method in an Apex class and needs to ensure that errors are handled properly.What would the developer use? (There are three correct answers.)

Page: Page 32

Option A: ApexPages.addErrorMessage()

Option B: A custom exception

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


6.

Page: Page 32

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


7.

Page: Page 32

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


8.

Page: Page 32

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


9. A developer has the following class and trigger code public class insurancerates{ public static final decimal smokercharge = 0.01; } trigger contacttrigger on contact (before insert){ insurancerates rates = new insurancerates(); decimal basecost=xxx; } Which code segment should a developer insert at the xxx to set the basecost variable to the value of the class variable smokercharge?

Page: Page 33

Option A: Rates.smokercharge

Option B: Contacttrigger.insurancerates.smokercharge

Option C: Insurancerates.smokercharge

Option D: Rates.getsmokercharge()

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


10. A developer needs to include a visualforce page in the detail section of a page layout for the account object, but does not see the page as an available option in the page layout editorwhich attribute must the developer include in the tag to ensure the visualforce page can be embedded in a page layout

Page: Page 33

Option A: Controller="account"

Option B: Extensions="accountcontroller"

Option C: Standardcontroller="account"

Option D: Action="accountid"

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


11. The account object has a custom percent field, rating, defined with a length of 2 with 0 decimal places. An account record has the value of 50% in its rating field and is processed in the apex code below after being retrieved from the database with SOQL public void processaccount(){ decimal acctscore = acc.rating__c * 100; } what is the value of acctscore after this code executes?

Page: Page 33

Option A: 5

Option B: 50

Option C: 500

Option D: 5000

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


12. In the code below, what type does Boolean inherit from? Boolean b= true;

Page: Page 33

Option A: Enum

Option B: Object

Option C: String

Option D: Class

Answer(s): 2

Explanation: Not available

SEO Keywords: SEO keywords not available


13. A company wants a recruiting app that models candidates and interviews; displays the total number of interviews on each candidate record; and defines security on interview records that is independent from the security on candidate records. What would a developer do to accomplish this task? Choose 2 answers

Page: Page 34

Option A: Create a roll -up summary field on the Candidate object that counts Interview records.

Option B: Create a master -detail relationship between the Candidate and Interview objects.

Option C: Create a lookup relationship between the Candidate and Interview objects.

Option D: Create a trigger on the Interview object that updates a field on the Candidate object.

Answer(s): 3,4

Explanation: Not available

SEO Keywords: SEO keywords not available


14. What can used to delete components from production?

Page: Page 34

Option A: A change set deployment with the delete option checked

Option B: An ant migration tool deployment with destructivechanges xml file and the components to delete in the package .xml file

Option C: A change set deployment with a destructivechanges XML file

Option D: An ant migration tool deployment with a destructivechanges XML file and an empty package .xml file

Answer(s): 4

Explanation: Not available

SEO Keywords: SEO keywords not available


15. An org has different Apex Classes that provide Account -related functionality.After a new validation rule is added to the object, many of the test methods fail.What can be done to resolve the failures and reduce the number of code changes needed for future validation rules?Choose 2 answers:

Page: Page 34

Option A: Create a method that creates valid Account records, and call this method from within test methods.

Option B: Create a method that loads valid Account records from a Static Resource, and call this method within test methods.

Option C: Create a method that performs a callout for a valid Account record, and call this method from within test methods.

Option D: Create a method that queries for valid Account records, and call this method from within test methods.

Answer(s): 1,2

Explanation: Not available

SEO Keywords: SEO keywords not available


16. A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension.Change set deployment to production fails with the test coverage warning: "Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required."What can the developer do to successfully deploy the new Visualforce page and extension?

Page: Page 34

Option A: Create test classes to exercise the Visualforce page markup.

Option B: Select "Disable Parallel Apex Testing" to run all the tests.

Option C: Add test methods to existing test classes from previous deployments.

Option D: Select "Fast Deployment'' to bypass running all the tests.

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


17. A developer has JavaScript code that needs to be called by controller functions in multiple Aura components by extending a new abstract component. Which resource in the abstract Aura component bundle allows the developer to achieve this?

Page: Page 35

Option A: helper.js

Option B: controllers

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


18.

Page: Page 35

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


19.

Page: Page 35

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


20.

Page: Page 35

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


21. Which two ways can a developer instantiate a PageReference in Apex? Choose 2 answers

Page: Page 36

Option A: By using an object standard set controller action

Option B: By using ApexPages.currentPage()

Option C: By using the PageReference.getURL() method

Option D: By using an object standard controller action

Answer(s): 1,3

Explanation: Not available

SEO Keywords: SEO keywords not available


22. What is the value of x after the code segment executes?String x = 'A';Integer i = 10;if ( i < 15 ) {i = 15;x = 'B';} else if ( i < 20 ) {x = 'C';} else {x = 'D'; }

Page: Page 36

Option A: D

Option B: A

Option C: B

Option D: C

Answer(s): 3

Explanation: Not available

SEO Keywords: SEO keywords not available


23. For which example task should a developer use a trigger rather than a workflow rule?

Page: Page 36

Option A: To set the primary Contact on an Account record when it is saved

Option B: To send an email to hiring manager when a candidate accepts a job offer.

Option C: To set the Name field of an expense report record to Expense and the Date when it is saved.

Option D: To notify an external system that a record has been modified.

Answer(s): 1

Explanation: Not available

SEO Keywords: SEO keywords not available


24. A developer needs to find information about @future methods that were invoked. From which system monitoring feature can the developer see this information?

Page: Page 36

Option A: Scheduled jobs

Option B: Apex Jobs

Option C: Background Jobs

Option D: Asynchronous Jobs

Answer(s): 2

Explanation: Not available

SEO Keywords: SEO keywords not available


25. Which two platform features allow for the use of unsupported languages? Choose 2 answers

Page: Page 37

Option A: Heroku Acm

Option B: App.json

Option C: Buildpacks

Option D: Docker

Answer(s): 3,4

Explanation: Not available

SEO Keywords: SEO keywords not available


26. Which two are true regarding a Dyno? Choose 2 answers

Page: Page 37

Option A: Is a light weight VM used to run code on the Heroku Platform

Option B: Has the ability to sleep as a standard and performance Dyno

Option C: Is a lightweight Linux container used in a collection to run Heroku applications

Option D: Has Ephemeral filesystems and is rebooted every 24 hours.

Answer(s): 3,4

Explanation: Not available

SEO Keywords: SEO keywords not available


27. Which three methods help ensure quality data?

Page: Page 37

Option A: Create a lookup filter

Option B: Adding an error to a field in before trigger

Option C: Sending an email alert using a workflow rule

Option D: Handling an exception in Apex

Answer(s): 1,3,5

Explanation: Not available

SEO Keywords: SEO keywords not available


28. A developer needs to update an unrelated object when a record gets saved. Which two trigger types should the developer create?

Page: Page 37

Option A: After insert

Option B: After update

Option C: Before update

Option D: Before insert

Answer(s): 3,4

Explanation: Not available

SEO Keywords: SEO keywords not available


29. Developer needs to automatically populate the Reports To field in a Contact record based on the values of the related Account and Department fields in the Contact record. Which type of trigger would the developer create? Choose 2 answers

Page: Page 38

Option A: Before update

Option B: After insert

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


30.

Page: Page 38

Answer(s):

Explanation: Not available

SEO Keywords: SEO keywords not available


Top Post Ad

Post a Comment