title: why is java math.round always rounding down?
body: <p>I have a number of fields which take inputs, a process which happens and then fields that show the output. My issue is that for some reason math.round seems to be always rounding down instead of to the nearest integer.</p>
  
  <p>Here is an example</p>
  
  <pre><code>private void method(){
      int X= Integer.parseInt(XjTF.getText());
      int Y= Integer.parseInt(YjTF.getText());
  
      float Z =(X+Y)/6;
  
      int output  =  Math.round(Z);
  
      OutputjTF.setText(Integer.toString(output)+" =answer rounded to closest integer");
  }
  </code></pre>