Write the following methods to 1) read the content of an array of 5 doublespublic static double[] readingArray2) find and

Write the following methods to 1) read the content of an array of 5 doublespublic static double[] readingArray2) find and print: the sum of the elements in an array of 5 double public static void sum(double [] array)3) find and print: the average of the elements in an array of 5 doubles pubic static void avg (double [] array)In the main method- invoke readingArray and enter the following numbers 50 20 10 40 30 – invoke sum- invoke avg.


Leave a Reply

Your email address will not be published. Required fields are marked *