listing3.7.java

来自「java 完全探索的随书源码」· Java 代码 · 共 20 行

JAVA
20
字号
/**
 * This method computes the payment for a loan based on
 * the interest rate, the number of payment periods, and
 * the loan amount.
 *
 * @param rate        The interest rate per payment period
 * @param numPayments The total number of payment periods
 * @param loanAmount  The present value of the loan
 * @return            The computed payment amount
 *
 * @throws InvalidLoanParameterException If one of the
 *           arguments is <= 0
 */
public static double computePayment( double rate, int numPayments,
  double loanAmount ) throws InvalidLoanParameterException {
  // compute and return the payment amount
  ...
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?