hiexam
salesforce · CRT-450 · Q602 · multiple_choice · topic_1

Which statement results in an Apex compiler error?

Which statement results in an Apex compiler error?
  • A.Map<Id,Leas> 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');
Explanation
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.

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.