C# and Java : 3 / 2 * 3.2 = 3.2, why?
<p>Conside the following for C# and Java,</p>

<pre><code>double d = 3 / 2 * 3.2;
</code></pre>

<p>Java</p>

<pre><code>System.out.println(d); // 3.2
</code></pre>

<p>C#</p>

<pre><code>Console.WriteLine(d); //3.2
</code></pre>

<p>It skip the 3/2,</p>

<p>We know that the correct answer should be 4.8</p>

<p>if i change to </p>

<pre><code>double d = 3.00 / 2 * 3.2;
</code></pre>

<p>I can get 4.8,</p>

<p>So i want to ask, if (3 / 2 * 3.2) is illegal , why eclipse and vs2008 have no error?
And how to prevent this problem in both C# and Java?</p>
