Write a recursive method called productarray that takes an


Write a recursive method called productArray that takes an array of integers, a start index and an end index and returns the product of the elements of the array. Identify your base case(s) and your general case(s). Your may assume that the input array will not be null.

Use the following method signature:

public static int productArray(int [] inArray, int start, int end)

Examples of input arrays and the resulting output arrays:
[ 1] results in 1
[ 2,4,6,8] results in 384
[ 5, 10, 15, 20, 25, 30 ] results in 11250000
[-2, 4, -6, 8 ] results in 384

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a recursive method called productarray that takes an
Reference No:- TGS01249942

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)