Find and Fix the Errors
The following recursive method addeven (...) is supposed to add the even indexed values of an array, i.e., a[0] + a[2] + a[4] + …There are bugs in the method.
Trace the method using test data, find the bugs, and correct them. Be thorough. The method may work on some data sets.
public static int addeven(int a[], int size){ if (size = = 2) return a[1]; return a[size − 1] + addeven(a, size − 2) ;}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.