green horn
Guoqiao Sun<br />SCJP2 SCWCD2<br />Creator of <a href="http://www.jiris.com/" target="_blank" rel="nofollow">www.jiris.com</a>, Java resource, mock exam, forum
Originally posted by wei luo:
Hi,
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?
Thanks.
green horn
Muhammad Farooq<br />Sun Certified Programmer for Java 2 Platform<br />Oracle8i Certified Professional Database Administrator
Muhammad Farooq<br />Sun Certified Programmer for Java 2 Platform<br />Oracle8i Certified Professional Database Administrator
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.
--Farooq
Muhammad Farooq<br />Sun Certified Programmer for Java 2 Platform<br />Oracle8i Certified Professional Database Administrator
Muhammad Farooq<br />Sun Certified Programmer for Java 2 Platform<br />Oracle8i Certified Professional Database Administrator
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
|