how to get float value from integer in java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4377842/how-can-i-convert-integer-into-float-in-java">How can I convert integer into float in Java?</a>  </p>
</blockquote>



<p>I got the problem with this code.
I have two variable <code>int i</code> and <code>float f</code>.</p>

<p><code>
int i = 23;</p>

<p>float f = i/10;
</code></p>

<p>I suppose the value in <code>f</code> variable should be <code>2.3</code></p>

<p>but the real output value in <code>f</code> is <code>2.0</code></p>

<p>Why result occurred like this and how can i get the float value <code>2.3</code></p>
