java rounding to two decimals
<p>I have a number </p>

<pre><code>double num = 1.234567;
</code></pre>

<p>and I'm trying to keep only two decimals</p>

<pre><code>num = (int)((num * 100) + 0.5) / 100.0;
</code></pre>

<p>but the actual number I got is 1.230000000001. How can I get rid of the 0000000001 part? </p>
