Apex Collections Flashcards

1
Q

What are the 3 types of Apex Collections?

A
  1. Lists
  2. Sets
  3. Maps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False:

Collections are a special type of variable and must hold data of only one type?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which statements below are true?

Maps are:

  1. a group of things
  2. contains 2 parts: a key and a value
  3. contains 2 parts: a key and a variable
  4. there can be no duplicate keys
  5. each key can only have one value
  6. each key can have at least two values
  7. different keys can have the same value
  8. different keys cannot have the same value
A
  1. a group of things
  2. contains 2 parts: a key and a value
  3. there can be no duplicate keys
  4. each key can only have one value
  5. different keys can have the same value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Trigger.oldMap can be used for (select all that apply)

  1. before update
  2. update
  3. after insert
  4. after update
  5. delete
  6. before insert
A

answer: Update and Delete.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Trigger.newMap can be used for (select all that apply):

  1. update
  2. after update
  3. before update
  4. delete
  5. after insert
  6. before insert
A

answer: before update, after insert, after update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Trigger.old can be used for:

  1. update
  2. after update
  3. before update
  4. delete
  5. after insert
  6. before insert
A

Answer: update, delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Trigger.new can be used for:

  1. update
  2. after update
  3. before update
  4. delete
  5. after insert
  6. before insert
A

Answer:before update, before insert, after update, after insert

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly