title: Using string format to add dollar sign and commas to my numbers
body: <p>I'm relatively new to Java, and I have a line of code I'm struggling with:</p>
  
  <pre><code>System.out.println(String.format("%-14s%10.2f","Income",income));
  </code></pre>
  
  <p>I would like to add a $ and commas to the income, but whenever I try to add it in the line, I get errors or the $ shows up in the wrong spot.</p>
  
  <p>So currently it prints:</p>
  
  <pre><code>Income      50000.00
  </code></pre>
  
  <p>but I would like it to print:</p>
  
  <pre><code>Income     $50,000.00
  </code></pre>
  
  <p>If there is a way to add these additions while keeping 'Income' and the digits nicely spaced apart, that'd be preferred. :)</p>