title: How can I convert integer into float in Java?
body: <p>I have two integers <code>x</code> and <code>y</code>. I need to calculate <code>x/y</code> and as outcome I would like to get float. For example as an outcome of <code>3/2</code> I would like to have 1.5. I thought that easiest (or the only) way to do it is to convert <code>x</code> and <code>y</code> into float type. Unfortunately, I cannot find an easy way to do it. Could you please help me with that?</p>