ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 12 - Certified Platform Developer II discussion

Report
Export

Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5 @AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems = new String*+, 'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?

A.
Line 1: class must be global
Answers
A.
Line 1: class must be global
B.
Lines 1 and 6: class and method must be global
Answers
B.
Lines 1 and 6: class and method must be global
C.
Line 6: method must be static
Answers
C.
Line 6: method must be static
D.
Line 8: method must first serialize the list to JSON before returning
Answers
D.
Line 8: method must first serialize the list to JSON before returning
Suggested answer: C
asked 23/09/2024
Carolina Velayos
49 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first