Question: Implement a recursive java method to find the sum of the first n int's in a java int array. Max size 20. Test with a
Implement a recursive java method to find the sum of the first n int's in a java int array. Max size 20. Test with a small main method just to make sure your works.
sum(integer array v, integer n)
if n=0
return 0
sum =
else
sum = nth number = sum of the first n-1 numbers
return sum
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
