请问结果应该是38,为什么返回26?
public static void main(String[] args) {
int[] a = {2,5,3,9,12,7};
System.out.println(test2(a,a.length-1));
}
private static int test2(int[] a,int i) {
if(i==0)
return a[0];
int x = test(a, i-1);
return x+a[i];
}