Thanks for your replies guys.
Yes Joe, I had my doubts about your reply. so I added couple of lines in the code to see what's going on at runtime.
Ruban, your calculation is right. but the real question i have is, even if the FIRST return statement returns the int, why is the returned value 15?
I had a question with similar logic in a
Java test offered to me by a recruiter.
Thanks again.