title: getting java.util.IllegalFormatConversionException: f != java.lang.String when using proper format %f for doubles
body: <p>The following code from the main is suppose to output the result to two decimal places using System.out.printf to format a double value with %f.
  However, I get the following error: </p>
  
  <pre><code>Exception in thread "main" java.util.IllegalFormatConversionException: f != java.lang.String
      at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
      at java.util.Formatter$FormatSpecifier.printFloat(Formatter.java:2806)
      at java.util.Formatter$FormatSpecifier.print(Formatter.java:2753)
      at java.util.Formatter.format(Formatter.java:2520)
  The total bonus for this employee is $  at java.io.PrintStream.format(PrintStream.java:970)
      at java.io.PrintStream.printf(PrintStream.java:871)
      at Assignment1.Q2.TestBonusOnSavings.main(TestBonusOnSavings.java:36)
  C:\Users\User\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
  BUILD FAILED (total time: 6 seconds)
  </code></pre>
  
  <p><strong>Part of the code with the formatted print statement:</strong></p>
  
  <pre><code>  //Displays the total bonus for an employee
    BonusOnSavings bonus = new BonusOnSavings();
    System.out.printf("The total bonus for this employee is $%,.2f",
                      bonus.computeBonus(commitment, q1, q2, q3, q4) + "\n");
  </code></pre>