Which statement results in an Apex compiler error?
Which statement results in an Apex compiler error?
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.
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.
Answer is D. String section start with "{" and end with ")".
No, it's wrong because it misses -new-
Dean5555, you are right
I saw Leas in A and I didnt read the rest. The error is thr whole question.
Both A and D will lead to compile error.
correct answer all thanks to validitexams.com
A n D look correct
It is missing new operator
A map lead is not same as leas. B invalid identifier
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ג€™'
D is not correct because of the missing "new" keyword. The wrong encoding string is not rly a thing here.
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.