Answer Posted / lakshay gupta
The statements within the try block are executed, and if any
of them throws an exception, execution of the block is
discontinued and the exception is handled by the catch
block. There may be multiple catch blocks, in which case the
first block with an exception variable whose type matches
the type of the thrown exception is executed.
If no catch block matches the type of the thrown exception,
the execution of the outer block (or method) containing the
try ... catch statement is discontinued, and the exception
is passed up and outside the containing block (or method).
The exception is propagated upwards through the call stack
until a matching catch block is found within one of the
currently active methods. If the exception propagates all
the way up to the top-most main method without a matching
catch block being found, a textual description of the
exception is written to the standard output stream.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What are loops in java? What are three types of loops?
What data type is true or false?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
Can we declare a static variable inside a method?
What is the major drawback of internal iteration over external iteration?
What is hashing principle in java?
How many wrapper classes are there in java?
What are the classes of java?
What are different data types?
Is null keyword in java?
What is main string [] args?
Give us the name of the list layoutmanagers in java?
What are memory tables?
What is communist flag?
How do you convert bytes to character in java?