the method in type not applicable for the arguments

后端 未结 4 1882
挽巷
挽巷 2020-12-20 10:53

I am getting this error message:

2 errors found:

Error: The method determineTaxRate(double) in the type PayCalculator is not applicable for

4条回答
  •  天涯浪人
    2020-12-20 11:22

    You are calling

    determineTaxRate()
    

    But your method is defined as this:

    public double determineTaxRate(double grossPay)
    {
    

    Same with your other error. You need to pass a double to the method. Such as this:

    determineTaxRate(calculateGrossPay())
    

提交回复
热议问题