In case of Java, when you define a decimal number as 10.1, its interpreted as a
double.
double is a 64-bit precision floating point, while
float is a 32-bit precision floating point. As
float is less precise than a
double, the conversion cannot be performed implicitly.
If you want to create a
float number, you should end your number with f (i.e.: 10.1f).
Fore more information visit here..
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html[
^]