SCJP1.6,SCWCD1.5
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
SCJP1.6,SCWCD1.5
narendra bhattacharya wrote:what are you saying that if the exception is caught it always print exception...i think .. you forgot the concept when control transfer used in finally
SCJP1.6,SCWCD1.5
SCJP1.6,SCWCD1.5
narendra bhattacharya wrote:but sir in khalid mughal book..
it is given
"if finally block neither throws exception nor executes a control transfer statement like a return or a labeled break ,the execution of the try block or any catch block determines how execution proceed after the finally block "
SCJP1.6,SCWCD1.5
narendra bhattacharya wrote:but sir finally cannot be placed inside a block i think..
narendra bhattacharya wrote:
arithmetic exception..
this gives the output
WHY EVEN AFTER THE CONTROL TRANSFER STATEMENT IT PRINTS THE EXCEPTION BUT IN return it does not.....
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
Henry Wong wrote:
narendra bhattacharya wrote:but sir finally cannot be placed inside a block i think..
Why not?
Henry
SCJP1.6,SCWCD1.5
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Bert Bates wrote:With all that said, I would say that putting breaks into exception handling is just a bad practice. There I said it. Am I about to get lambasted?
I am a man of mystery. Mostly because of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|