double cost = 450.98; int numYears = 6; double totalCost; // no assignment because not yet calculated totalCost = cost * numYears; // note allowed assignment System.out.print("Total cost is "); System.out.println(totalCost);