Martins Thoughts on Salesforce

Create Collections in APEX and initiate them

A cheat-sheet for the Salesforce developer

Create Collections in APEX and initiate them As a developer of multiple languages, I must remember how to create the different collection types when writing code in APEX. Sure, it is simple enough to make an empty collection, but you often want to create and initialize it simultaneously. This is when my memory struggles to remember. You may be the same - and here is a small cheat sheet that will help you in these situations.