An org has a single account named `˜NoContacts' that has no related contacts. Given the query: List accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=`˜NoContacts']; What is the result of running this Apex?

QuestionsCategory: CRT-450An org has a single account named `˜NoContacts' that has no related contacts. Given the query: List accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=`˜NoContacts']; What is the result of running this Apex?
Admin Staff asked 4 months ago
An org has a single account named `˜NoContacts' that has no related contacts. Given the query:
List accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=`˜NoContacts'];
What is the result of running this Apex?

A. accounts[0].contacts is invalid Apex.

B. accounts[0].contacts is an empty Apex.

C. accounts[0].contacts is Null.

D. A QueryException is thrown.








 

Suggested Answer: B





This question is in CRT-450 Salesforce Certified Platform Developer I Exam
For getting Salesforce Certified Platform Developer I











Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by Salesforce. 
Trademarks, certification & product names are used for reference only and belong to Salesforce.
The website does not contain actual questions and answers from Salesforce's Certification Exams.

Next Post

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.