PackageDemo.java.html

  1  import com.horstmann.bigjava.Financial;
  2  
  3  public class PackageDemo
  4  {
  5     public static void main(String[] args)
  6     {
  7        double price = 9.95;
  8        double taxRate = 8.25;
  9        double tax = Financial.percentOf(price, taxRate);
 10        System.out.printf("Tax: %.2f\n", tax);
 11     }
 12  }