title: Force double to display 2 decimal points
body: <p>Bit of a silly one, but just to clarify I know I can format the output to a string and then format the string in a variety of ways to achieve this but I need the return value to stay as a double as it has multiple uses.</p>
  
  <p>So basically I have a <code>LinkedList</code> that i am reading values in from that was formatted as a double when imported. I am then using the sum of these values to essentially calculate a total which I am using in a <code>toString</code> function and a couple of other places. </p>
  
  <p>My issue is if there are trailing zeros they are trimed so the values is as small as possible. e.g: 3.50 -> 3.5, 0.00 -> 0.0 and so on.</p>
  
  <pre><code>public double totalCost(){
          double total = 0.00;
          for(Ingredient cost : ingredients){
              total += cost.ingredientCost();
          }
          return total;
  </code></pre>
  
  <p>The code above is the sum code.</p>
  
  <pre><code>public String toString(){
          return crust() + " pizza with " + toppings() + " and " + sauce() + ": $" + totalCost();
      }
  </code></pre>
  
  <p>And this is my <code>toString</code> function.</p>
  
  <p>Any guidance would be awesome.</p>