public class PrintfExample { public static void main(String[] args) { double amount = 12618.98; double interestRate = 0.0013; double interest = amount * interestRate; System.out.printf( "With amount $%,.2f and interest rate %1.4f, the interest is $%4.2f.", amount, interestRate, interest); } }