Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 1 discussion

Actual exam question from Salesforce's CRT-450
Question #: 1
Topic #: 1
[All CRT-450 Questions]

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');
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
questmajor
Highly Voted 2 years, 8 months ago
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.
upvoted 10 times
...
fios
Most Recent 7 months, 3 weeks ago
A n D look correct
upvoted 1 times
...
ManoranjanM
1 year ago
Selected Answer: D
It is missing new operator
upvoted 1 times
...
Ging1991
2 years, 4 months ago
I saw Leas in A and I didnt read the rest. The error is thr whole question.
upvoted 3 times
...
trilokesh
2 years, 9 months ago
A map lead is not same as leas. B invalid identifier
upvoted 1 times
...
Vasu9Deva
2 years, 11 months ago
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ג€™'
upvoted 1 times
noox
2 years, 11 months ago
D is not correct because of the missing "new" keyword. The wrong encoding string is not rly a thing here.
upvoted 4 times
...
...
oscand15
2 years, 11 months ago
Answer is D. String section start with "{" and end with ")".
upvoted 4 times
...
ekanki
3 years, 2 months ago
Both A and D will lead to compile error.
upvoted 2 times
...
Max641
3 years, 2 months ago
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.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...