What are three valid Apex loop structures for iterating through items in the collection?

Given:

Map<ID, Account> accountMap = new Map>ID, Account> ([SELECT Id, Name FROM Account]);

What are three valid Apex loop structures for iterating through items in the collection? (Choose three.)
A . for (ID accountID : accountMap.keySet()) {…}
B . for (Account accountRecord : accountMap.values()) {…}
C . for (Integer i=0; I < accountMap.size(); i++) {…}
D . for (ID accountID : accountMap) {…}
E . for (Account accountRecord : accountMap.keySet()) {…}

Answer: A,B,C

Latest CRT-450 Practice Questions with 372 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments