Double to String, how to delete 0 after dot
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/703396/how-to-nicely-format-floating-types-to-string">How to nicely format floating types to String?</a>  </p>
</blockquote>



<p>I have number: </p>

<pre><code>Double d1=(Double)0;
Double d2=(Double)2.2;
Double d3=(Double)4;
</code></pre>

<p>When I use to String, I get 0.0, 2.2, 4.0, but I want to see 0, 2.2, 4.
How can I do it?</p>
