printf and string concatenation I think; beginner at this future looks bleak

The code works fine. Just looking for information on how to set up my print f and get the desired results.

signs more than one print f statement(s):

import java.util.Scanner;

public class Coupon {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner input = new Scanner(;
        double total = 0;
        double rate = 0;
        double coupon = 0;

        System.out.print ( " Please enter the cost of your groceries:") ;
        total = input.nextDouble();

        if (total < 10)
            rate = 0;

        else if (total > 10.01 && total <=60 ) 
            rate = .08;

        else if (total > 60.01 && total <=150 ) 
            rate = .10;

        else if (total > 150.01 && total <=210 ) 
            rate = .12;

        else if (total > 210.01)
            rate = .14; 

        coupon = total*rate;

        System.out.printf(" You win a discount coupon worth $ %3.2f\n",coupon, "(",rate, "% of your" ,total, "purchase");

You win a discount coupon worth $1.12. (8% of your purchase price)


This issue is really frustrating me. I am developping a webapp that creates ical files for users. The issue that I am facing, is whenever the ical event repeates weekly or daily or monthly, the start ...

I have an application in which every Sunday, it checks a MySQL database for data from the past week. I am trying to find out how to get the date String for each day of the past week. My obvious ...

I've create sample theme, i.e. custom.css according to liferay tutorial, and don't know why my theme is not deployed, in the log file is the next content: "No theme found for specified theme id . ...

What is difference b/w Discriminator Value And Discriminator Column? Purpose of both term and when to use? Note: I have read many topics after searching but totally confused. Please Explain with the ...