Raghuraman Guruswamy wrote:
2. I have some statements after try,catch,finally block.Will that be executed?
[Ans]: If there is any exception, the program control will go to the catch block & finally block & then the program execution stops.
If there is no exception, then the statements after the finally() block will be executed.
I love this place!
There are other possibilities, as in this post from 2006.arulk pillai wrote:Only time the finally block is not reached is when
-- there is a System.exit() statement.
-- there is an endless loop
Raghuraman Guruswamy wrote:All,
Thanks a lot for all of your replies.
Would be great if you can review my third question also.
Cheers
2. I have some statements after try,catch,finally block.Will that be executed?
-- it is possible for an instance of the class to be serialized once, then deserialized many times, resulting in many instance being created.
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Jothi Shankar Kumar wrote:What happens if we clone the singleton instance?? I guess it is a good practice to override clone and throw an exception if an attempt to clone a singleton instance is made.
Sandeep
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |