Question: For #4 why exactly can't a perfect size array be used? Do methods using perfect size arrays have to return the array reference? Isn't the

For #4 why exactly can't a perfect size array be used? Do methods using perfect size arrays have to return the array reference? Isn't the perfect array size changed in #3? Can a method not change the size of a perfect sized array?
3) int [] removeAll(int[] arrayReference, int target) Only a perfect size array Correct Only an oversize array This method can be used only for a perfect size array Both perfect and oversize arrays could be used because the method does not have a parameter for the array size and because the method returns an array reference for an array constructed inside the method. 4) int removeAll(int[] arrayReference, int startIndex, int stopIndex, int target) Correct Only a perfect size array This method is designed to process a range within an Only an oversize array array. By setting startIndex to 0 and stopindex to the Both perfect size and oversize arrays could be used array's length or the array's size, the method can be used with oversize arrays. Because the method returns an int, a programmer can determine that the method could change the array size, so cannot be used with a perfect size array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
