sahan thinusha wrote:f=0.123456789123456789F;//compile
but, f=0.123456789123456789;//compile error
A floating point literal in Java is a double unless you tell the compiler otherwise with the F. So it's like you're doing and when you assign a double value to a float variable, you can lose precision, so the compiler requires you to cast.
and (f=0.1234567......F;)=(d=0.1234567.........;) or (f=0.1234567......F;)<(d=0.1234567.........;) please explain this.
It's not really clear what you're asking, but if you're asking whether a float will be equal to a less than a double intiialized to the same literal, the answer is, it depends. If the number can be represented exactly in a float, they'll be equal. If it cannot be, they might be different, because the double has more precision.