CompTIA
ADR-001 · Question #69
Which of the following is true about methods that receive an array as a parameter?
The correct answer is D. The developer should clone the array object and store the copy. See the full explanation below for the reasoning.
Question
Which of the following is true about methods that receive an array as a parameter?
Options
- AThe developer should never use an array as a parameter because it will cause a buffer overflow.
- BThe developer should expose the array so it can be modified outside the class.
- CThe developer should clear the array first.
- DThe developer should clone the array object and store the copy.
How the community answered
(43 responses)- A16% (7)
- B5% (2)
- C7% (3)
- D72% (31)
Community Discussion
No community discussion yet for this question.