-1
There is an integer array defined. To get the sum of all elements we used to iterate through an array and get the sum.
int arr[] = {5,2,6,3,7,9,12};
int sum=0;
for(int i=0;i<arr.length;i++){
sum+=arr[i];
}
Is there any alternative in java 7 to get the sum without iterating each elements of...