A program in Java to calculate the average value of array elements.
In the above Java program to calculate the average value of array elements, we will loop through each element using for loop and then adding and storing the value in sum variable and dividing it by the length of the array. Sample Output: Average value of the array elements is : 50.0