Hey I am trying to practice some recursive function writing for a class I am taking and I am writing this code and I pull up an error that says ".class" expected in the bold, underlined line!
import java.util.*;
/* This class is one in which the program will take the sum
* of a set of integers in an array
*/
public class ArraySum
{
/* This method is one in which the function will take the
* integer values in an array and perform the sum of them
* from the first parameter to the last parameter inclusive
*/
public static int array_sum(int A[], int first, int last)
{
if(first == last)
{
return A[first];
}
else
{
[B][U]return A[last] + array_sum(A[],first,last-1);[/U][/B]
}
} // end array_sum method
public static void main(String[] args)
{
for(int first = 0; first>=0; i++)
{
//Gather the integers
System.out.println("Next Integer:");
Scanner sc2 = new Scanner(System.in);
first = sc2.nextInt();
}
// Print solution
System.out.println(array_sum(A[1000],3,0));
} //end main method
} // end ArraySum class