Consider a method named avg, which accepts four numbers as integers and returns
ID: 3656064 • Letter: C
Question
Consider a method named avg, which accepts four numbers as integers and returns their average as a double. Which of the following is a correct call to the method avg? avg(2, 3.14,3, 5); double average = avg(2, 3, 4, 5); avg(); double average = avg("2", "3", "4", "5"); What is the error in the following method implementation? public static int tripler(int numPara) { double result = numPara * 3; } The method does not return a value. The method returns a value of type double. The method does not modify its parameter variable. The method should be private.Explanation / Answer
c a
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.