import java.util.Arrays;
public class AddArray{
public static void main(String args[]){
int arr[] = {1,4,6,5,3,7,8};
int sum=0;
System.out.println("The entered array is : "+ Arrays.toString((arr)));
for(int i=0;i<arr.length;i++){
sum = sum+arr[i];
}
System.out.println("The sum of entered array is : "+ sum);
}
}