@palerock/exam-qa 1.0.6-patch10 → 1.0.6-patch11

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,8 @@
22
22
  "isRight": false
23
23
  }
24
24
  ],
25
- "hashCode": "1988675003"
25
+ "hashCode": "1988675003",
26
+ "analysis": ""
26
27
  },
27
28
  {
28
29
  "describe": "<p>Refer to the following code snippet for an environment has more than 200 Accounts belonging to the &#39;Technology&#39; industry:</p><p>for(Account thisAccount : [Select Id, Industry FROM Account LIMIT 150]){</p><p>&nbsp; &nbsp; &nbsp;if(thisAccount.Industry == &#39;Technology&#39; ){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisAccount.Is_Tech__c = true;</p><p>&nbsp; &nbsp; &nbsp; }</p><p>update thisAccount;</p><p>}</p><p><br/></p><p>When the code executes, what happens as a result of the Apex transaction?</p><p><br/></p>",
@@ -44,7 +45,8 @@
44
45
  "isRight": true
45
46
  }
46
47
  ],
47
- "hashCode": "1988675002"
48
+ "hashCode": "1988675002",
49
+ "analysis": ""
48
50
  },
49
51
  {
50
52
  "describe": "<p>Considering the following code snippet:</p><p>public static void insertAccounts(List&lt;Account&gt; theseAccounts){</p><p>&nbsp; &nbsp; &nbsp; for(Account thisAccount : theseAccounts) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(thisAccount.website == null) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thisAccount.website = &#39;https://www.demo.com&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp;update theseAccounts;</p><p>}</p><p>when the code executes, a DML exceptionis thrown.</p><p>How should the developer modify the code to ensure exceptions are handled gracefully?</p><p><br/></p>",
@@ -66,7 +68,8 @@
66
68
  "isRight": true
67
69
  }
68
70
  ],
69
- "hashCode": "1988675001"
71
+ "hashCode": "1988675001",
72
+ "analysis": ""
70
73
  },
71
74
  {
72
75
  "describe": "<p>The orderHelper class is a utility class that contains business logic for processing orders. Consider the code snippet:</p><p><br/></p><p>public class without sharing OrderHelper{</p><p>//code implementation.</p><p>}</p><p><br/></p><p>A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15, The valua of instant should not change at any time in the code.</p><p>How should the developer declare the DELIVERY_MULTIPLIER Constant to meet the business objectives?</p><p><br/></p>",
@@ -88,7 +91,8 @@
88
91
  "isRight": false
89
92
  }
90
93
  ],
91
- "hashCode": "1988675000"
94
+ "hashCode": "1988675000",
95
+ "analysis": ""
92
96
  },
93
97
  {
94
98
  "describe": "<p>A developer wrote the following two classes:</p><p><br/></p><p>public with sharing class statusFetcher{</p><p>private Boolean active = true;</p><p>private Boolean isActive(){</p><p>return active;</p><p>}</p><p>}</p><p>public with sharing class Calculator{</p><p>public void doCalculations()</p><p>StatusFetcher sFetcher = new StatusFetcher();</p><p>if(sFetcher.isActive())</p><p>//do calculatlons here</p><p>}</p><p>&nbsp; }</p><p>}</p><p><br/></p><p>The StatusFetcher class successfully complled and saved.However, the calculator class has a compile time error.</p><p>How should the developer fix this code?</p><p><br/></p>",
@@ -110,7 +114,8 @@
110
114
  "isRight": true
111
115
  }
112
116
  ],
113
- "hashCode": "1988674999"
117
+ "hashCode": "1988674999",
118
+ "analysis": ""
114
119
  },
115
120
  {
116
121
  "describe": "<p>Given the code below in an Apex class:</p><p><br/></p><p>List&lt;Account&gt; aList=[SELECT Id, Active_c EROM Account];</p><p>for (Account a : a List){</p><p>if[!a.Active_c){</p><p>a.Name = &#39;INACTIVE&#39;;</p><p>}</p><p>}</p><p>update aList;</p><p><br/></p><p>What should a developer do to correct the code so that there is no chance of hitting a govermorlimit?</p><p><br/></p>",
@@ -132,7 +137,8 @@
132
137
  "isRight": true
133
138
  }
134
139
  ],
135
- "hashCode": "1988674998"
140
+ "hashCode": "1988674998",
141
+ "analysis": ""
136
142
  },
137
143
  {
138
144
  "describe": "<p>A lead developer creates an Apex interface called &quot;Laptop&quot;. Consider the following code snippet:</p><p><br/></p><p>public class SilverLaptop{</p><p>//code implementaticn</p><p>}</p><p><br/></p><p>How can a developer use the Laptop interface within the SilverLaptop class?</p><p><br/></p>",
@@ -154,7 +160,8 @@
154
160
  "isRight": true
155
161
  }
156
162
  ],
157
- "hashCode": "1988674997"
163
+ "hashCode": "1988674997",
164
+ "analysis": ""
158
165
  },
159
166
  {
160
167
  "describe": "<p>Management asked for opportunities to be automatically created for accounts with annual revenue greater then $1000000. A developer created the following trigger on the Account object to satisfy this requirement.</p><p>For(Account a : Trigger.new) {</p><p>&nbsp; &nbsp; &nbsp; if(a.AnnualRevenue &gt; 1000000) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;Opportunity&gt; oppList = [SELECT Id FROM Opportunity WHERE accountId = :a.Id];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(oppList.size() ==0) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Opportunity oppty = new Opportunity(Name = a.Name, StageName = &#39;Prospecting&#39;, CloseDate = system.today().addDays(30);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; insert oppty;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; }</p><p>}</p><p>Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, if fails with System.Exception errors.</p><p>Which two actions should the developer take to fix the code segment shown above? Choose 2 answers</p><p><br/></p>",
@@ -176,7 +183,8 @@
176
183
  "isRight": true
177
184
  }
178
185
  ],
179
- "hashCode": "1988674996"
186
+ "hashCode": "1988674996",
187
+ "analysis": ""
180
188
  },
181
189
  {
182
190
  "describe": "<p>A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to provide a list of terms to search.</p><p>Consider the following code snippet:</p><p><br/></p><p>@AuraEnabled</p><p>public static List&lt;List&lt;sObject&gt;&gt; searchTerms(List&lt;String&gt; termlist){</p><p>List&lt;List&lt;sObject&gt;&gt; result = new List&lt;List&lt;sObject&gt;&gt;() :</p><p>for(string term: termList) {</p><p>result.addAl1([FIND :term IN ALL FIELDS RETURNING Account Name),</p><p>contact(FirstName,LastName)]};</p><p>}</p><p>return result;</p><p>}</p><p><br/></p><p>What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?</p><p><br/></p>",
@@ -198,7 +206,8 @@
198
206
  "isRight": true
199
207
  }
200
208
  ],
201
- "hashCode": "1988674995"
209
+ "hashCode": "1988674995",
210
+ "analysis": ""
202
211
  },
203
212
  {
204
213
  "describe": "<p>A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class.\nWhich code segment shows the correct declaration of the class and methods?</p>",
@@ -220,7 +229,8 @@
220
229
  "isRight": false
221
230
  }
222
231
  ],
223
- "hashCode": "1988674994"
232
+ "hashCode": "1988674994",
233
+ "analysis": ""
224
234
  },
225
235
  {
226
236
  "describe": "<p>Consider the following code snippet:</p><p><br/></p><p>public static List&lt;Lead&gt; obtainAllFields(Set&lt;Id&gt; 1eadIds) {</p><p>List&lt;Lead&gt; result = new List&lt;Lead&gt;();</p><p>for(Id leadId : leadIds) {</p><p>result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId];</p><p>}</p><p>return result;</p><p>}</p><p><br/></p><p>Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement and ensure successful execution of the method?</p><p><br/></p>",
@@ -242,7 +252,8 @@
242
252
  "isRight": true
243
253
  }
244
254
  ],
245
- "hashCode": "1988674972"
255
+ "hashCode": "1988674972",
256
+ "analysis": ""
246
257
  },
247
258
  {
248
259
  "describe": "<p>Given the following code snippet, that is part of a custom controller for a Visualforce page:</p><p>public void updateContact(Contact thisContact) {</p><p>&nbsp; &nbsp; &nbsp;thisContact.Is_Active__c = false;</p><p>&nbsp; &nbsp; &nbsp;try{</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; update thisContact;</p><p>&nbsp; &nbsp; &nbsp;}catch(Exception e) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; String errorMessage = &#39;An error occurred while updating the Contact. &#39; + e.getMessage());</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL.errorMessage));</p><p>&nbsp; &nbsp; &nbsp;}</p><p>}</p><p>In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the&nbsp;</p><p>current logged-in user does not have the appropriate level of access?&nbsp;</p><p>Choose 2 answers</p><p><br/></p>",
@@ -264,7 +275,8 @@
264
275
  "isRight": true
265
276
  }
266
277
  ],
267
- "hashCode": "1988674970"
278
+ "hashCode": "1988674970",
279
+ "analysis": ""
268
280
  },
269
281
  {
270
282
  "describe": "<p>What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name &quot;UC&quot;?</p>",
@@ -286,7 +298,8 @@
286
298
  "isRight": false
287
299
  }
288
300
  ],
289
- "hashCode": "1988674969"
301
+ "hashCode": "1988674969",
302
+ "analysis": ""
290
303
  },
291
304
  {
292
305
  "describe": "<p>Example 1:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.get(&#39;expr0&#39;));</p><p>}</p><p><br/></p><p>Example 2:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.get(&#39;theAverage&#39;));</p><p>}</p><p><br/></p><p>Example 3:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.get.AVG());</p><p>}</p><p><br/></p><p>Example 4:</p><p>AggregateResult[ ] groupedResults = [ SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId];</p><p>for (AggregateResult ar : groupedResults)&nbsp;</p><p>{</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Campaign ID&#39; + ar.get(&#39;CampaignId&#39;));</p><p>&nbsp; &nbsp; &nbsp; System.debug( &#39;Average amount&#39; + ar.theAverage);</p><p>}</p><p>Which two examples above use the System.debug statements to correctly display the results from the SOQL aggregate queries?</p><p>Choose 2 answers</p><p><br/></p>",
@@ -308,7 +321,8 @@
308
321
  "isRight": false
309
322
  }
310
323
  ],
311
- "hashCode": "1988674967"
324
+ "hashCode": "1988674967",
325
+ "analysis": ""
312
326
  },
313
327
  {
314
328
  "describe": "<p>Refer to the following code that runs in an Execute Anonymous block:</p><p>for( List&lt;Lead&gt; theseLeads : [SELECT LastName, Company, Email FROM Lead LIMIT 20000]) {</p><p>&nbsp; &nbsp; for(Lead thisLead : theseLeads) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(thisLead.Email == null)</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; thisLead.Email = assignGenericEmail(thisLead.LastName, thisLead.Company);</p><p>&nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp;Database.Update(theseLeads, false);</p><p>}</p><p>In an environment where the full result set is returned, what is a possible outcome of this code?</p><p><br/></p>",
@@ -330,7 +344,8 @@
330
344
  "isRight": false
331
345
  }
332
346
  ],
333
- "hashCode": "1988674966"
347
+ "hashCode": "1988674966",
348
+ "analysis": ""
334
349
  },
335
350
  {
336
351
  "describe": "<p>Given the code below:</p><p>List&lt;Account&gt; aList = [SELECT Id FROM Account];</p><p>for(Account a : aList) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp;List&lt;Contact&gt; cList = [SELECT Id FROM Contact WHERE AccountId =:a.Id];</p><p>}</p><p>What should a developer do to correct the code so that there is no chance of hitting a governor limit?</p><p><br/></p>",
@@ -352,7 +367,8 @@
352
367
  "isRight": true
353
368
  }
354
369
  ],
355
- "hashCode": "1988674964"
370
+ "hashCode": "1988674964",
371
+ "analysis": ""
356
372
  },
357
373
  {
358
374
  "describe": "<p>In the following example, which sharing context will myMethod execute when it is invoked?</p><p><br/></p><p>public Class myClass {</p><p>&nbsp; &nbsp; &nbsp;public void myMethod( ) { /* implementation */ }</p><p>}</p><p><br/></p>",
@@ -374,7 +390,8 @@
374
390
  "isRight": false
375
391
  }
376
392
  ],
377
- "hashCode": "1988674963"
393
+ "hashCode": "1988674963",
394
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm</p>"
378
395
  },
379
396
  {
380
397
  "describe": "<p>A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.\nWhat is the correct definition of the Apex method?</p>",
@@ -396,7 +413,8 @@
396
413
  "isRight": false
397
414
  }
398
415
  ],
399
- "hashCode": "1988674290"
416
+ "hashCode": "1988674290",
417
+ "analysis": "<p>https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm</p>"
400
418
  },
401
419
  {
402
420
  "describe": "<p>Refer to the following code snippet for an environment has more than 200 Accounts belonging to the &#39;Technology&#39; industry:</p><p>for(Account thisAccount : [Select Id, Industry FROM Account LIMIT 150]){</p><p>&nbsp; &nbsp; &nbsp;if(thisAccount.Industry == &#39;Technology&#39; ){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisAccount.Is_Tech__c = true;</p><p>&nbsp; &nbsp; &nbsp; }</p><p>update thisAccount;</p><p>}</p><p><br/></p><p>When the code executes which two events occur as a result of the Apex transaction?Choose 2 answers</p><p><br/></p>",
@@ -418,7 +436,8 @@
418
436
  "isRight": false
419
437
  }
420
438
  ],
421
- "hashCode": "1988674288"
439
+ "hashCode": "1988674288",
440
+ "analysis": ""
422
441
  },
423
442
  {
424
443
  "describe": "<p>A developer wants to mark each Account in a List&lt;Account&gt; as either Active or Inactive based on the LastModifiedDate field value being more than 90 days.</p><p>Which Apex technique should the developer use?</p><p><br/></p>",
@@ -440,7 +459,8 @@
440
459
  "isRight": true
441
460
  }
442
461
  ],
443
- "hashCode": "1988674287"
462
+ "hashCode": "1988674287",
463
+ "analysis": ""
444
464
  },
445
465
  {
446
466
  "describe": "<p>What is the result of the following code?</p><p>Account a = new Account( );</p><p>Database. insert(a, false);</p><p><br/></p>",
@@ -462,7 +482,8 @@
462
482
  "isRight": false
463
483
  }
464
484
  ],
465
- "hashCode": "1988674286"
485
+ "hashCode": "1988674286",
486
+ "analysis": ""
466
487
  },
467
488
  {
468
489
  "describe": "<p>The following Apex method is part of the ContactSertvice class that is called from a trigger:</p><p>public static void setBusinessUnitToEMEA(Contact thisContact){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; thisContact . Business_Unit__c = &#39;EMEA&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; update thisContact;</p><p>}</p><p><br/></p><p>How should the developer modify the code to ensure best practices are met?</p><p><br/></p>",
@@ -484,7 +505,8 @@
484
505
  "isRight": false
485
506
  }
486
507
  ],
487
- "hashCode": "1988674285"
508
+ "hashCode": "1988674285",
509
+ "analysis": ""
488
510
  },
489
511
  {
490
512
  "describe": "<p>What will be the output in the debug log in the event of a QueryException duing a call to the aQuery method in the following example?</p><p><br/></p><p>class myClass {</p><p>&nbsp; &nbsp;class CustomException extends QueryException&nbsp; { }</p><p>&nbsp; &nbsp;public static Account aQuery( ) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp;Account theAccount;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;try {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;system. debug( &#39; Querying Accounts. &#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;theAccount = [SELECT Id FROM Account WHERE CreatedDate &gt; TODAY] ;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; catch (CustomException eX) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system.debug(&#39; Custom Exception. &#39;);</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; catch (QueryException eX) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; system.debug(&#39;Query Exception. &#39;);</p><p>&nbsp; &nbsp; &nbsp; }&nbsp;</p><p>&nbsp; &nbsp; &nbsp;finally {</p><p>&nbsp; &nbsp; &nbsp; &nbsp;system.debug(&#39;Done. &#39;);</p><p>&nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; return theAccount ;</p><p>&nbsp; }</p><p>}</p><p><br/></p>",
@@ -506,7 +528,8 @@
506
528
  "isRight": false
507
529
  }
508
530
  ],
509
- "hashCode": "1988674284"
531
+ "hashCode": "1988674284",
532
+ "analysis": ""
510
533
  },
511
534
  {
512
535
  "describe": "<p>What is the result of the following code snippet?</p><p><br/></p><p>public void doWork(Account acct){</p><p>&nbsp; &nbsp; &nbsp; for (Integer i = 0; i &lt;= 200; i++){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; insert acct;</p><p>&nbsp; &nbsp; &nbsp; }</p><p>&nbsp;}</p><p><br/></p>",
@@ -528,7 +551,8 @@
528
551
  "isRight": false
529
552
  }
530
553
  ],
531
- "hashCode": "1988674282"
554
+ "hashCode": "1988674282",
555
+ "analysis": ""
532
556
  },
533
557
  {
534
558
  "describe": "<p>How many Accounts will be inserted by the following block of code?</p><p><br/></p><p>for(Integer i = 0; i&lt; 500; i++){</p><p>&nbsp; &nbsp; Account a = new Account (Name= &#39;New Account &#39; +i);</p><p>&nbsp; &nbsp; insert a;</p><p>}</p><p><br/></p>",
@@ -550,7 +574,8 @@
550
574
  "isRight": false
551
575
  }
552
576
  ],
553
- "hashCode": "1988674281"
577
+ "hashCode": "1988674281",
578
+ "analysis": ""
554
579
  },
555
580
  {
556
581
  "describe": "<p>A dveloper must implement a CheckPaymentProcessor class that povides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface.&nbsp;</p><p><br/></p><p>public interface PaymentProcessor {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; void pay (Decimal amount) ;</p><p>}</p><p><br/></p><p>Which is the correct implementation to use the PaymentProcessor interface class?</p><p><br/></p>",
@@ -572,7 +597,8 @@
572
597
  "isRight": true
573
598
  }
574
599
  ],
575
- "hashCode": "1988674259"
600
+ "hashCode": "1988674259",
601
+ "analysis": ""
576
602
  },
577
603
  {
578
604
  "describe": "<p>A developer created a Visualforce page and custom controller to display the account type field as shown below.</p><p>Custom controller code:</p><p><br/></p><p>public with sharing class customCtrlr {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;private Account theAccount;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public String actType;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;public customCtrlr( ) {</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; theAccount = [SELECT Id, Type FROM Account WHERE Id = :ApexPages.currentPage().getParameters().get(&#39;Id&#39;)];</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; actType = theAccount.Type;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>}</p><p>Visualforce page snippet:</p><p>The Account Type is {!actType}</p><p><br/></p><p>The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly&nbsp;</p><p>referenced on the Visualforce page, what should the developer do to correct the problem?</p><p><br/></p>",
@@ -594,7 +620,8 @@
594
620
  "isRight": false
595
621
  }
596
622
  ],
597
- "hashCode": "1988674258"
623
+ "hashCode": "1988674258",
624
+ "analysis": ""
598
625
  },
599
626
  {
600
627
  "describe": "<p>A developer is tasked to perform a security review of the ContactSearch Apex calss that exists in the system. Within the class, the developer identifies the following method as a security threat:</p><p><br/></p><p>List&lt;Contact&gt; performSearch(String lastName){</p><p>&nbsp; &nbsp;return Database.query(&#39;SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like %&#39;+lastName+&#39;%&#39; );</p><p><br/></p><p>What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers</p><p><br/></p>",
@@ -616,7 +643,8 @@
616
643
  "isRight": true
617
644
  }
618
645
  ],
619
- "hashCode": "1988674256"
646
+ "hashCode": "1988674256",
647
+ "analysis": ""
620
648
  },
621
649
  {
622
650
  "describe": "<p>A developer is debugging the following code to determine why Account are not being created.</p><p>Account a = new Account(Name=&#39;A&#39;);</p><p>Database.insert(a, false);</p><p><br/></p><p>How should the code be altered to help debug the issue?</p><p><br/></p>",
@@ -638,7 +666,8 @@
638
666
  "isRight": false
639
667
  }
640
668
  ],
641
- "hashCode": "1988674255"
669
+ "hashCode": "1988674255",
670
+ "analysis": ""
642
671
  },
643
672
  {
644
673
  "describe": "A developer wants to retrieve the Contacts and Users with the email address 'dev@uc.com'.\nWhich SOSL statement should the developer use?",
@@ -660,7 +689,8 @@
660
689
  "isRight": false
661
690
  }
662
691
  ],
663
- "hashCode": "1988674254"
692
+ "hashCode": "1988674254",
693
+ "analysis": ""
664
694
  },
665
695
  {
666
696
  "describe": "<p>A developer considers the following snippet of code:</p><p><br/></p><p>Boolean isOK;</p><p>Integer x;</p><p>String theString = &#39;Hello&#39;;</p><p><br/></p><p>if(isOk == false &amp;&amp; theString == &#39;Hello&#39;){</p><p>x=1;</p><p>}else if(isOK == true &amp;&amp; theString == &#39;Hello&#39;){</p><p>x=2;</p><p>}else if(isOk == null&nbsp; &amp;&amp; theString == &#39;Hello&#39;){</p><p>x=3;</p><p>}else{</p><p>x=4;</p><p>}</p><p><br/></p><p>Based on this code, what is the value of x?</p><p><br/></p>",
@@ -682,7 +712,8 @@
682
712
  "isRight": true
683
713
  }
684
714
  ],
685
- "hashCode": "1988674253"
715
+ "hashCode": "1988674253",
716
+ "analysis": ""
686
717
  },
687
718
  {
688
719
  "describe": "<p>Assuming that &#39;name&#39; is a Stirng obtained by an &lt;apex:inputText&gt; tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection?Choose 2 answers</p>",
@@ -704,7 +735,8 @@
704
735
  "isRight": true
705
736
  }
706
737
  ],
707
- "hashCode": "1988674252"
738
+ "hashCode": "1988674252",
739
+ "analysis": ""
708
740
  },
709
741
  {
710
742
  "describe": "<p>A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can overrude.\nWhat is the correct implementation of the ShippingCalculator class?</p>",
@@ -726,29 +758,8 @@
726
758
  "isRight": false
727
759
  }
728
760
  ],
729
- "hashCode": "1988674251"
730
- },
731
- {
732
- "describe": "<p>Given the following block of code:</p><p><br/></p><p>try{</p><p>&nbsp; List&lt;Account&gt; retrievedRecords = [SELECT Id FROM Account WHERE Website = null];</p><p>}catch(Exception e){</p><p>&nbsp; &nbsp; //manage excception logic</p><p>}</p><p><br/></p><p>What should a developer do to ensure the code execution is disrupted if the list retrievedRecords remains empty after the SOQL query?</p><p><br/></p>",
733
- "answerOptions": [
734
- {
735
- "describe": "<p>Check the state of the retrievedRecords variable and access the first element of the list if the variable is empty.</p>",
736
- "isRight": false
737
- },
738
- {
739
- "describe": "<p>Check the state of the retrievedRecords variable and throw a custom exception if the variable is empty.</p>",
740
- "isRight": true
741
- },
742
- {
743
- "describe": "<p>Check the state of the retrievedRecords variable and use System.assert(false) if the variable is empty.</p>",
744
- "isRight": false
745
- },
746
- {
747
- "describe": "<p>Replace the retrievedRecords variable declaration from a List of Account to a single Account.</p>",
748
- "isRight": false
749
- }
750
- ],
751
- "hashCode": "1988674250"
761
+ "hashCode": "1988674251",
762
+ "analysis": ""
752
763
  },
753
764
  {
754
765
  "describe": "<p>Given the following trigger implementation:</p><p><br/></p><p>trigger leadTrigger on Lead (before update){</p><p>&nbsp; &nbsp; &nbsp; &nbsp;final ID BUSINESS_RECORDTYPEID = &#39;012500000009Qad&#39;;</p><p>&nbsp; &nbsp; &nbsp; &nbsp;for(Lead thisLead: Trigger.new){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(thisLead.Company != null &amp;&amp; thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp;}</p><p>}</p><p><br/></p><p>The developer receivers deployment errors every time a deployment is attempted from Sandbox to Production.</p><p>What should the developer do to ensure a successful deployment?</p><p><br/></p>",
@@ -770,7 +781,8 @@
770
781
  "isRight": true
771
782
  }
772
783
  ],
773
- "hashCode": "1988674227"
784
+ "hashCode": "1988674227",
785
+ "analysis": ""
774
786
  },
775
787
  {
776
788
  "describe": "<p>Given the following Anonymous Block:</p><p>List&lt;Case&gt; casesToUpdate = new List&lt;Case&gt;( );</p><p>for(Case thisCase : [Select Id, Status FROM Case LIMIT 50000]){</p><p>&nbsp; &nbsp; &nbsp;thiscase. Status = &#39;Working&#39;;</p><p>&nbsp; &nbsp; &nbsp;casesToUpdate. add(thisCase);</p><p>}</p><p>try{</p><p>&nbsp; Database. update(casesToUpdate, false);</p><p>}catch(Exception e){</p><p>&nbsp; System. debug(e. getMessage());</p><p>}</p><p><br/></p><p>What should a developer consider for an environment that has over 10,000 Case records?</p><p><br/></p>",
@@ -792,7 +804,8 @@
792
804
  "isRight": true
793
805
  }
794
806
  ],
795
- "hashCode": "1988674225"
807
+ "hashCode": "1988674225",
808
+ "analysis": ""
796
809
  },
797
810
  {
798
811
  "describe": "<p>Which statement generates a list of Leads and Contacts that have a field with the phrase &#39;ACME&#39;?</p>",
@@ -814,7 +827,8 @@
814
827
  "isRight": false
815
828
  }
816
829
  ],
817
- "hashCode": "1988674224"
830
+ "hashCode": "1988674224",
831
+ "analysis": ""
818
832
  },
819
833
  {
820
834
  "describe": "<p>What is the maximum number of SOQL queries used by the following code?</p><p>List&lt;Account&gt; aList = [SELECT Id from Account LIMIT 5];</p><p>for(Account a : aList){</p><p>List&lt;Contact&gt; cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id];</p><p>}</p><p><br/></p>",
@@ -836,7 +850,8 @@
836
850
  "isRight": false
837
851
  }
838
852
  ],
839
- "hashCode": "1988674223"
853
+ "hashCode": "1988674223",
854
+ "analysis": ""
840
855
  },
841
856
  {
842
857
  "describe": "A developer needs to prevent the creation of Request records when certain exist in the system. A RequestLogic class exists that checks the conditions.\nWhat is the correct implementation?",
@@ -858,7 +873,8 @@
858
873
  "isRight": false
859
874
  }
860
875
  ],
861
- "hashCode": "1988674222"
876
+ "hashCode": "1988674222",
877
+ "analysis": ""
862
878
  },
863
879
  {
864
880
  "describe": "Given the following Apex statement:\nAccount myAccount = [SELECT Id, Name FROM Account];\nWhat occurs when more than one Account is returned by the SOQL query?",
@@ -880,7 +896,8 @@
880
896
  "isRight": true
881
897
  }
882
898
  ],
883
- "hashCode": "1988674221"
899
+ "hashCode": "1988674221",
900
+ "analysis": ""
884
901
  },
885
902
  {
886
903
  "describe": "A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.\nPublic interface Sortable{\nvoid sort();\n}\nPublic interface Drawable{\nvoid draw();\n}\nWhich is the correct implementation?",
@@ -902,7 +919,8 @@
902
919
  "isRight": true
903
920
  }
904
921
  ],
905
- "hashCode": "1988674219"
922
+ "hashCode": "1988674219",
923
+ "analysis": ""
906
924
  },
907
925
  {
908
926
  "describe": "A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class.\npublic virtual class Payment{\n public virtual void makePayment(Decimal amount) { /*implementation*/}\n}\nWhich is the correct implementation?",
@@ -924,7 +942,8 @@
924
942
  "isRight": false
925
943
  }
926
944
  ],
927
- "hashCode": "1988674197"
945
+ "hashCode": "1988674197",
946
+ "analysis": "https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_extending.htm?search_text=virtual"
928
947
  },
929
948
  {
930
949
  "describe": "The following Apex method is part of the ContactService class that is called from a trigger:\npublic static void setBusinessUnitToEMEA(Contact thisContact){\n thisContact.Business_Unit__c = 'EMEA';\n update thisContact;\n}\nHow should the developer modify the code to ensure best practices are met?",
@@ -946,7 +965,8 @@
946
965
  "isRight": false
947
966
  }
948
967
  ],
949
- "hashCode": "1988674195"
968
+ "hashCode": "1988674195",
969
+ "analysis": ""
950
970
  },
951
971
  {
952
972
  "describe": "<p>A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit.</p><p>public without sharing class OpportunityService{</p><p><br/></p><p>&nbsp; &nbsp; &nbsp; public static List&lt;OpportunityLineItem&gt; getOpportunityProducts(Set&lt;Id&gt; opportunityIds){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;OpportunityLineItem&gt; oppLineItems = new List&lt;OpportunityLineItem&gt;();</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(Id thisOppId : opportunityIds){</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oppLineItems. addAll([Select Id FROM OppLineItem WHERE OpportunityId = :thisOppId]);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</p><p>&nbsp; &nbsp; &nbsp; &nbsp; return oppLineItems;</p><p>&nbsp; &nbsp; &nbsp;}</p><p>&nbsp;}</p><p><br/></p><p>The above method might be called during a trigger execution via a Lightning component.</p><p>Which technique should be implemented to avoid reaching the governor limit?</p><p><br/></p>",
@@ -968,7 +988,8 @@
968
988
  "isRight": false
969
989
  }
970
990
  ],
971
- "hashCode": "1988674194"
991
+ "hashCode": "1988674194",
992
+ "analysis": ""
972
993
  },
973
994
  {
974
995
  "describe": "<p>A Visual Flow uses an Apex Action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo. \nWhich is the correct definition of the Apex method that gets the additional information?</p>",
@@ -990,7 +1011,31 @@
990
1011
  "isRight": true
991
1012
  }
992
1013
  ],
993
- "hashCode": "1988674192"
1014
+ "hashCode": "1988674192",
1015
+ "analysis": ""
1016
+ },
1017
+ {
1018
+ "describe": "<p>Given the following block of code:</p><p><br/></p><p>try{</p><p>&nbsp; List&lt;Account&gt; retrievedRecords = [SELECT Id FROM Account WHERE Website = null];</p><p>}catch(Exception e){</p><p>&nbsp; &nbsp; //manage excception logic</p><p>}</p><p><br/></p><p>What should a developer do to ensure the code execution is disrupted if the list retrievedRecords remains empty after the SOQL query?</p><p><br/></p>",
1019
+ "answerOptions": [
1020
+ {
1021
+ "describe": "<p>Check the state of the retrievedRecords variable and access the first element of the list if the variable is empty.</p>",
1022
+ "isRight": false
1023
+ },
1024
+ {
1025
+ "describe": "<p>Check the state of the retrievedRecords variable and throw a custom exception if the variable is empty.</p>",
1026
+ "isRight": true
1027
+ },
1028
+ {
1029
+ "describe": "<p>Check the state of the retrievedRecords variable and use System.assert(false) if the variable is empty.</p>",
1030
+ "isRight": false
1031
+ },
1032
+ {
1033
+ "describe": "<p>Replace the retrievedRecords variable declaration from a List of Account to a single Account.</p>",
1034
+ "isRight": false
1035
+ }
1036
+ ],
1037
+ "hashCode": "1988674250",
1038
+ "analysis": ""
994
1039
  }
995
1040
  ],
996
1041
  "hashCode": "-302233965"