I have a program that I\'m trying to make for class that returns the sum of all the integers in an array using recursion. Here is my program thus far:
public
a[n-1]
is getting the int at n-1, not the array from 0 to n-1.
try using
Arrays.copyOf(a, a.length-1);
instead