Financial.java.html

  1  public class Financial
  2  {
  3     /**
  4        Computes a percentage of an amount. 
  5        @param percentage the percentage to apply
  6        @param amount the amount to which the percentage is applied
  7        @return the requested percentage of the amount 
  8     */
  9     public static double percentOf(double percentage, double amount)
 10     { 
 11        return (percentage / 100) * amount;
 12     }
 13  }