Possible Duplicate:
How can I convert integer into float in Java?
I got the problem with this code.
I have two variable int i and float f.
int i = 23;
float f = i/10;
I suppose the value in f variable should be 2.3
but the real output value in f is 2.0
Why result occurred like this and how can i get the float value 2.3
float f = (float)i/10;