I am getting a run time error and I cannot figure out why. Although I have figured out that it is happening because of the following line of code.
System.out.printf("\n\nThe total bill for your group is $%.2f before taxes. The HST (13%) will be $%.2f.", totalBill, amountOfTax);
totalBill and amountOfTax are both float type variables.
I am fairly new to programming and have hardly any experience with using printf. I have a very similar line of code earlier in the program that does essentially the same thing and it runs fine.
The error that I am getting is as follows:
Exception in thread "main" java.util.UnknownFormatConversionException: Conversion = ')'
at java.util.Formatter.checkText(Formatter.java:2579)
at java.util.Formatter.parse(Formatter.java:2555)
at java.util.Formatter.format(Formatter.java:2501)
at java.io.PrintStream.format(PrintStream.java:970)
at java.io.PrintStream.printf(PrintStream.java:871)
at RestaurantOrder.main(RestaurantOrder.java:220)
Thanks for any help, I appreciate it!
ps. I should note that I am using Eclipse Luna (4.4.0)