I guess in the first example you have on the right side an int with the value of ten. In order to be put into a float an implicit cast is done as float is larger than int.
In the second example you have a double on the right side (all floating point literals in
Java are double if you don't put an 'f' at the end (1.23f)). This is not implicitly casted as float is smaller than double (possible loss of precision).
John