I know its kind of stupid question. Wanted to know how the code works.
Code 1:
float a =123L;
Here, even though the number 123L is of long type (8 bytes) and the float a(4bytes) i don't get the compile time error as "Possible lossy conversion"
Code 2:
long c=123.0D;
Here even though the double and long type are of 8 bytes,I still get the "Possible lossy conversion" compile time error.
I was thinking the values which are getting stored in the variable should be the both Type compatible.