Exam CRT-450 All QuestionsBrowse all questions from this exam
Question 1

Which statement results in an Apex compiler error?

    Correct Answer: A

    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
questmajorOption: D

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

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

Dean5555

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

mwwt2022

Dean5555, you are right

Ging1991Option: A

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

ekankiOption: D

Both A and D will lead to compile error.

lahigat951Option: D

correct answer all thanks to validitexams.com

fiosOption: D

A n D look correct

ManoranjanMOption: D

It is missing new operator

trilokeshOption: D

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

Vasu9DevaOption: D

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

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

Max641Option: D

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.