Question 66
Given the code below, what can be done so that recordcount can be accessed by a test class, but not by a non-test class? Public class mycontroller{ private integer recordcount; }
Question 67
Which action can a developer take to reduce the execution time of the following code? List<account> allaccounts = [select id from account]; list<account> allcontacts = [select id, accountid from contact]; for (account a :allaccounts){ for (contact c:allcontacts){ if(c.accountid = a.id){ //do work } } }
Question 68
What are three ways for a developer to execute tests in an org? Choose 3.
Question 69
A team of many developers work in their own individual orgs that have the same configuration at the production org. Which type of org is best suited for this scenario?
Question 70
A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:
Account myAccount = new Account(Name = 'MyAccount');Insert myAccount;For (Integer x = 0; x < 250; x++)
{Account newAccount = new Account (Name='MyAccount' + x);try {Insert newAccount;}catch (Exception ex) {System.debug (ex) ;}}insert new Account (Name='myAccount'); How many accounts are in the org after this code is run?
