Why the result of 1/3=0 in java?
<p>Hi
I was writing this code in java.</p>

<pre><code>public static void main(String d[]){
           double g=1/3;
       System.out.printf("%.2f",g);
}
</code></pre>

<p>the result is zero and how to solve this problem?</p>
