View RSS Feed

Java Object

Object-oriented programming in Java.

  1. Passing Information to a Method or a Constructor

    by , 04-26-2012 at 06:15 PM
    Declaration for constructor or a method makes declared the type & number of the arguments for that constructor or method. For instance, given method computes the home loan monthly payments which depend upon the loan amount, loan length, interest rate or the loan’s future value.
    Java Code:
    public double computePayment(
                      double loanAmt,
                      double rate,
                      double futureValue,
                      int numPeriods) {