CRT-450 Exam QuestionsBrowse all questions from this exam

CRT-450 Exam - Question 1


Which statement results in an Apex compiler error?

Show Answer
Correct Answer: AD

The statement results in an Apex compiler error because 'Leas' is not a recognized type in Salesforce Apex. The correct type should be 'Lead'. This mismatch in type definition would cause a compiler error when attempting to create the map.

Discussion

10 comments
Sign in to comment
questmajorOption: D
Feb 24, 2022

Based on the actual Exam, the items are: A. Map<Id, Lead> lmap = new Map<Id, Lead>([Select ID from Lead Limit 8]); B. Date d1 = Date.Today(), d2 = Date.ValueOf('2018-01-01'); C. Integer a=5, b=6, c, d = 7; D. List<string> s = List<string>{'a','b','c'); So the correct answer is D.

oscand15Option: D
Nov 26, 2021

Answer is D. String section start with "{" and end with ")".

Dean5555
Oct 6, 2022

No, it's wrong because it misses -new-

mwwt2022
Oct 3, 2023

Dean5555, you are right

Ging1991Option: A
Jul 1, 2022

I saw Leas in A and I didnt read the rest. The error is thr whole question.

ekankiOption: D
Sep 11, 2021

Both A and D will lead to compile error.

Max641Option: D
Aug 19, 2021

Answer A contains a type. Map<Id,Leas> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]); Leas is not the same as Lead. This should throw an error as well.

Vasu9DevaOption: D
Dec 5, 2021

Correct answer A,B and D A. Map<Id,Leas> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]); Leas is not the same as Lead. B. Invalid identifier 'ג€˜2018' D. Invalid identifier 'ג€˜aג€™'

noox
Dec 21, 2021

D is not correct because of the missing "new" keyword. The wrong encoding string is not rly a thing here.

trilokeshOption: D
Feb 14, 2022

A map lead is not same as leas. B invalid identifier

ManoranjanMOption: D
Nov 6, 2023

It is missing new operator

fiosOption: D
Mar 26, 2024

A n D look correct

lahigat951Option: D
Jul 10, 2024

correct answer all thanks to validitexams.com