Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Online PDI Questions Video

Page: 5 / 18
Total 235 questions

Platform Developer I (SP23) Questions and Answers

Question 17

A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?

Options:

A.

@BeforeTest

B.

@isTest(SeeAllData=True)

C.

@TestSetup

D.

@PreTest

Question 18

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

Options:

A.

Implement the upsert DML statement.

B.

Implement Change Data Capture.

C.

Implement a try/catch block for the DML.

D.

Remove null items from the list of Accounts.

Question 19

Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?

When the code executes, which two events occur as a result of the Apex transaction?

Choose 2 answers

Options:

A.

If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML governor limit

B.

The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.

C.

The Apex transaction fails with the following message. "SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c''.

D.

If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL governor limit.

Question 20

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

Options:

A.

Public class DrawList implements Sortable, Implements Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

]

B.

Public class DrawList extends Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

C.

Public class DrawList implements Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

D.

Public class DrawList extends Sortable, extends Sortable, extends Drawable {

public void sort() { /*implementation*/ }

public void draw() { /* implementation */}

Page: 5 / 18
Total 235 questions