Limited access

Upgrade to access all content for this subject

Consider the following method, which is intended to average two numbers and return the result.

public double averageNumbers(int num1, int num2)
    // implementation not shown

You would like to add other methods that handle different data types and/or different situations, and you would like to name these methods with the same name as this original method.

Which one of the following method signatures would NOT compile successfully?

public int averageNumbers(double num1, double num2)
public double averageNumbers(double num1, int num2)
public double averageNumbers(int num1, int num2, int decimals)
public double averageNumbers(int num1, double num2)
public int averageNumbers(int num1, int num2)
Select an assignment template