Question: Write a recursive method in java called getMax that takes an array of integers as a parameter. Return the largest integer in the array. Hint
Write a recursive method in java called getMax that takes an array of integers as a parameter. Return the largest integer in the array.
Hint
Use the static method Arrays.copyOfRangearray start, stop to create a smaller array.
start represents the starting index of the new array, and stop represents the ending element of the new array.
In addition, use the Math.maxint int method to return the larger of two integers.
Expected Output
If the getMax method is called with the array then it would return
If the getMax method is called with the array then it would return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
