Originally posted by wei luo:
I have more questions on this code.
1) Which x-- is returned at last?
2) How does the code handle Line 12 exception?
3) Can anyone give a good site to see the difference between NaN and ArithmeticException?
Originally posted by Muhammad Farooq:
Do we need to return only because the method's return type is int.
I tried by commenting the return statements and changing the return type of the method as void, and it compiled.