> ## Content Index
> Fetch the complete content index at: https://www.namastesalesforce.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 02 · Variables, types and collections
- URL: https://www.namastesalesforce.com/courses/apex-beginners/variables-types-and-collections/
- Published: 2025-05-25T09:00:00.000Z
- Updated: 2025-05-25T09:00:00.000Z
- Description: Lists, Sets and Maps do ninety percent of the work in real Apex. Learn the three of them properly and the rest is syntax.
- Author: Swarnil Singhai
- Tags: Apex for Absolute Beginners, #lesson, #duration-25m, #Import 2026-09-03 19:13

Lists, Sets and Maps do ninety percent of the work in real Apex. Learn the three of them properly and the rest is syntax.

## Strong types, few surprises

Every variable declares its type. Id is not a String (until it is), Decimal beats Double for money, and null is the value you will meet most often.

## Map<Id, SObject> is the workhorse

Half of all bulk-safe Apex is 'build a map, look things up by Id'. We build three of them in this lesson so the shape becomes reflex.

## Practice in your org

- Open your Developer Edition org and follow along step by step
- Change one thing at a time and note what happens
- When something breaks, read the error before searching for it