public class chap7p4 { public static void main(String[] args) { int[] heights = { 33, 45, 23, 43, 48, 32, 35, 46, 48, 39, 41, }; printArray(heights);
findAverage has a void return type. Change the return type for the method to return an int value
findAverage
int
public static int findAverage(int[] array) { ... return total / array.length; }