Complete the method named sumArray in the class named ArrayO
Complete the method, named sumArray, in the class named ArrayOps.java, so that it sums all the integer values in an array.
The one parameter coming into the method is an array of integers. The integer value returned is the sum of these integers.
Complete the following code:
Solution
public static void main(String args[]){
 int[] array = {1, 2, 30, 40, 50, -10};
 
 int sum = 0;
 sum = sumArray(array);
 System.out.println(\"Sum of array elements is:\"+sum);
}

