Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Ramya Subraamanian wrote:okay so any exceptions that are thrown in the catch or the finally block will never be caught - is my understanding right.
If so then since the exception in the catch block is not caught then the program must terminate right, why must it call the finally block.
abcException in thread "main" ejava.lang.RuntimeException: 3
at Hello3.main(Hello3.java:38)
this is the output i get. this just looks like a stack trace.
shoud i assume that since finally block is always be called ..hence it runs.
Out on HF and heard nobody, but didn't call CQ? Nobody heard you either. 73 de N7GH
Ramya Subraamanian wrote:In this code above the RuntimeException thrown as throw new RuntimeException("1");in line 10 -> why is this not caught by the catch (RuntimeException e) { in line 11, why is this skipped and finally is called.
Ramya Subraamanian wrote:okay so any exceptions that are thrown in the catch or the finally block will never be caught - is my understanding right.
Ramya Subraamanian wrote:If so then since the exception in the catch block is not caught then the program must terminate right, why must it call the finally block.
Ramya Subraamanian wrote:abcException in thread "main" e java.lang.RuntimeException: 3
at Hello3.main(Hello3.java:38)
this is the output i get. this just looks like a stack trace.
Ramya Subraamanian wrote:shoud i assume that since finally block is always be called ..hence it runs.
Beware the other head of science - it bites! Nibble on this message:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|