Question: You have a class called Statistics that has a ( public ) method called average that takes an array of doubles and returns the average
You have a class called Statistics that has a public method called "average" that takes an array of doubles and returns the average of the array.
Suppose you see the following lines of code in another file:
double arr ;
double avg Statistics.averagearr;
System.out.printlnthe average is: avg;
What listed below must be true about the average method?
Group of answer choices
average must be a private method
average must be a static method no instance of the Statistics class
average is being called on an instance of the Statistics class
the code won't compile
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
