title: java program using int and double
body: <p>I have written a simple Java program as shown here:</p>
  
  <pre><code>public class Test {
  
      public static void main(String[] args) {
          int i1 =2;
          int i2=5;
          double d = 3 + i1/i2 +2;
          System.out.println(d);
      }
  }
  </code></pre>
  
  <p>Since variable <code>d</code> is declared as double I am expecting the result of this program is <code>5.4</code> but I got the output as <code>5.0</code></p>
  
  <p>Please help me in understanding this.</p>