Originally posted by neha jain:
the correct answer given for this is that output wiil b 4.
but what i guess is that it should give a compile time error,as ceil method takes only double as an argument.if we pass integer it will give a compile time error.
can anybody help me.
neha.
The correct answer is 4. No compile error in this case. It is *always* possible to pass an integer to a method which takes double as per conversion rules. Conversion rules for primitives take place in -
* Assignemnt
* Method Calls
* Arithetic operations
HTH,
- Manish