UiPath Automation Developer Professional v1 — Question 118
The “arrayOfPointsGainedByParticipant” Object array is created and initialized with the following values: {“7”, “4”, “1”}. Which is the value and data type returned, at runtime, by arrayOfPointsGainedByParticipant(1)?
Answer options
- A. Value: 4 - Data Type: Object
- B. Value: 7 - Data Type: String
- C. Value: 4 - Data Type: String
- D. Value: 7 - Data Type: Object
Correct answer: C
Explanation
The correct answer is C because arrayOfPointsGainedByParticipant(1) accesses the second element of the array, which is "4", and since it's initialized as a string, its data type is also String. Options A, B, and D are incorrect as they either provide the wrong value or incorrect data type for the accessed element.