It is no unit, f
indicates that the number is a float
.
If you just write 0.1
for example, you will get an error because 0.1
will be parsed as a double
value. The compiler needs the instruction that the value is desired a float. That's what's the f
for.
See http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html