Skip to main content

Just to double check before I embark. I've got the following queued up to help me do the Developer I certification:

 

Building Applications with Force.com

&

Build the recruitment app

&

Dip through Trailhead

 

Sound about right?

5 commenti
  1. 31 dic 2015, 09:57

    //--------------------------------------------------------------------------------------------

    //TASK 1: Create a Hello World anonymous block.

    //TODO: Write a single line to output the text "Hello World!" to the results window

    System.debug('Hello World');

    //--------------------------------------------------------------------------------------------

    //TASK 2: Create a map of integers and check if the map contains a specific key.

    //TODO: Instantiate a map called “numbers” that has an integer as keys and a string as values.

    //TODO: Create a FOR loop that loops 100 times and adds the values 0 thru 99 as the key and the string value of the number as the value of the map.

    //TODO: Create an IF statement that verifies that the map contains the value 35 and display the value using a System.debug statement.

    map<integer, string> numbers = new map<integer, string>();{

    for (Integer i = 0; i<99; i++){

    numbers.put(i,String.valueof(i));

    // System.Debug(i);

    if(i == 35){

    System.Debug('This map contains the value ' + i);

    }

    }

    }

    //--------------------------------------------------------------------------------------------

    //TASK 3: Create a list of new accounts with unique names.

    //TODO: Instantiate a list of Account data types

    //TODO: Create a loop to add 20 new accounts to the list with a unique name for each account.

    //TODO: Create a FOR loop to display the name of each account in your list using System.Debug.

    list<account> newaccounts = new list<account>();

    for (integer i = 1; i<21; i++){

    account newacc = new account(name = 'NewAccount #' + i);

    newaccounts.add(newacc);

    }

    for (account countacc : newaccounts) {

    System.debug('Account Name is: ' +

    countacc.name

    );

    }

    //--------------------------------------------------------------------------------------------

    //TASK 4: Create a set of date data check to see if it contains a specific day.

    //TODO: Instantiate a Set of Date data types called myDates.

    //TODO: Create a FOR loop that adds the next 100 days to the Set starting with Today’s date.

    //TODO: Create a date variable called Birthday that contains the date of your next birthday.

    //TODO: Write an IF statement that tests to see if myDates contains the value of birthday.

    //--------------------------------------------------------------------------------------------

    set<date> dateseries = new set<date>{};

    date datetoadd = date.today();

    for(integer i = 1; i<101; i++){

    date birthday = date.newinstance(2016,10,17);

    // System.debug(datetoadd);

    // System.debug(birthday);

    if(datetoadd.isSameDay(birthday)){

    System.Debug('My birthday is in the next 100 days.');

    }

    else if (i == 100){

    System.Debug('My birthday is not in the next 100 days.');

    }

    dateseries.add(datetoadd);

    datetoadd = datetoadd.addDays(1);

    }

0/9000