average of the values in the array code example Example: java code to calculate average of array java code to calculate average of array