compiles and runs fine.I do not understand how the type conversion is working here.Please help !
posted 11 years ago
Look at the API docs for the Math class. There is no method that takes (float, long) as arguments to it looks for the best match signature. Since a long can be automatically cast to float it calls the (float, float) version. Note that there may be precision loss in the conversion from long to float.