Question: Write a program named WriteMethod.java, wichin this class, define a method as described follows: public static int countAboveAverage(int[] arr) This method counts how many elements
Write a program named WriteMethod.java, wichin this class, define a method as described follows: public static int countAboveAverage(int[] arr) This method counts how many elements in the array are greater than the average of the array. Then copy the following code to the main method to test your method int[] arr={1,2,1,20,-9,53,68}; System.out.println(countAboveAverage(arr));
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
