多选题 What is wrong with the following method?
public double interestDue(double currentBalance, float interestRate) {
double interestDue = currentBalance * interestRate;
return interestDue;
}
  • A. It should use all float primitives.
  • B. It should use all Float objects.
  • C. It should use all double primitives.
  • D. It should use all Double objects.
  • E. It should use BigDecimal objects.
  • F. Nothing is wrong with this method.
  • G. It does not compile because you cannot do math operations with primitives that are not the same type.
【正确答案】 E
【答案解析】当处理货币的任何值时,都不能失去精度,不能使用基本数据类型。A、B、C、D、F和G不正确。