Question: A programmer has written a method named fillIt to initialise the elements of an array of integers. The programmer uses the method as follows: int

A programmer has written a method named fillIt to initialise the elements of an array of
integers. The programmer uses the method as follows:
int[] numbers = new int[20];
fillIt(numbers);
Which of the following is true?
A.The array object must be constructed inside the method, not outside it
B. The elements of an array cannot be initialised using a method
C. The design is correct
D.If the array object is constructed outside the method, a reference must be returned

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!