Arun,
Is it mandatory that catch should have return or some statements with in the {}
No, not at all. Sometimes, the apropriate thing to do in the case of an Exception is.... nothing at all.
(One common example is in the catch for InterruptedException when calling wait() or sleep().) So, the compiler won't give you an error simply because your catch {} is empty - it has to trust your judgement as to how the Exception is best handled, including not handling it.
What error does the compiler give if you comment out that "return" statement from the catch {}? That will give a hint as to
why the compiler gives an error. I suspect it is something like "method might not return a value". So it's not the empty catch block, it's that you are removing the return statement.
*** gibberish removed here
sorry, I had something here that I had "proved" to myself erroneously. I was looking at one of the bits of code above, but copying/pasting/playing with another, and didn't notice they weren't the same case. I drew a bad conclusion.
*** end gibberish removed here
Alex: good luck in 20...19...18 days

I put off
SCJP for over 1 year, until 2 days before my voucher expired. That strategy worked well for me - I got a 95%, and I can only attribute that to my total lack of focus and concentration
Added:
I meant to make one other point - if you comment out that return in the catch block, but also add a line AFTER the try/catch/finally that returns a value, then the compiler is happy - it sees that it is possible to reach a "return" statement, without counting on the finally block, even if the Exception gets thrown.
-- Jon
[ May 03, 2005: Message edited by: Jon Egan ]
[ May 03, 2005: Message edited by: Jon Egan ]