Hi,
In
java there is something called Widening conversion for Primitive data types, Widening conversions change a value to a type that accomodates a wider range of values than theoriginal type can accomodate.In most cases
the new type has more bitsthan the original.
Widining Conversion follows this path
byte-->short(or char)-->int-->long-->float-->double
so here in ur case when ur doing this
m(a1)--> here ur argument is of type int but u don't have any method which takes int as argument so it will follow WIdening conversion and call next higher type argument method here its FLOAT so it prints float.
m(b1)--> here simlarly ur passing b1 as long which again follows widining path n calls method with FLOAT n print float.
I think you just read any Java book it will give u more clear idea.
thanks
Anurag