title: Formatting A Double In A String Without Scientific Notation
body: <p>I have a double. <code>double foo = 123456789.1234;</code>. I want to turn <code>foo</code> into a String. <code>String str = foo+&quot;&quot;;</code>. But now <code>foo</code> is equal to &quot;1.234567891234E8&quot;. Is there a way I can turn <code>foo</code> into a String without scientific notation?
  I've tried</p>
  <pre><code>String str = String.format(&quot;%.0f&quot;, foo);
  </code></pre>
  <p>But that just removes the decimals. It sets <code>str</code> to &quot;123456789&quot;;
  I've tried</p>
  <pre><code>String str = (new BigDecimal(foo))+&quot;&quot;;
  </code></pre>
  <p>But that loses accuracy. Its sets <code>str</code> to &quot;123456789.1234000027179718017578125&quot;;</p>