Divyesh,
Maybe I'm wrong, but I'd like to guess.
I think it's because the constructor for a Long wrapper takes either a
String or a long. Being that all non-decimal literals are 32-bit "ints", you'd have to append an "L" to the 2:
Long l = 2L ;
Long l = new Long( 2L ) ;
The same applies to type Float, which requires an "f" appended to the value of the literal.
Float f = 2.5f ;
Float f = new Float( 2.5f ) ;
Of course, if you are not using a wrapper, you are allowed to use only "long l = 2" without the appended L, but only because the int is implicitly upcast without any loss of precision. However, that is not the case with floats, as "float f = 2.5" will create a compiler error for possible loss of precision.
Again, maybe I'm wrong, but that's my guess.