Apex Collections Flashcards
1
Q
What are the 3 types of Apex Collections?
A
- Lists
- Sets
- Maps
2
Q
True or False:
Collections are a special type of variable and must hold data of only one type?
A
True
3
Q
Which statements below are true?
Maps are:
- a group of things
- contains 2 parts: a key and a value
- contains 2 parts: a key and a variable
- there can be no duplicate keys
- each key can only have one value
- each key can have at least two values
- different keys can have the same value
- different keys cannot have the same value
A
- a group of things
- contains 2 parts: a key and a value
- there can be no duplicate keys
- each key can only have one value
- different keys can have the same value
4
Q
Trigger.oldMap can be used for (select all that apply)
- before update
- update
- after insert
- after update
- delete
- before insert
A
answer: Update and Delete.
5
Q
Trigger.newMap can be used for (select all that apply):
- update
- after update
- before update
- delete
- after insert
- before insert
A
answer: before update, after insert, after update
6
Q
Trigger.old can be used for:
- update
- after update
- before update
- delete
- after insert
- before insert
A
Answer: update, delete
7
Q
Trigger.new can be used for:
- update
- after update
- before update
- delete
- after insert
- before insert
A
Answer:before update, before insert, after update, after insert
8
Q
A