Answer Posted / rizwana
The finally keyword can be used to provide a block of code
that is performed regardless of whether an exception is
signaled or not. The syntax is:
try
{
// tested statement(s);
}
catch (ExceptionName e1)
{
// trap handler statement(s);
}
catch (ExceptionName e2) // any number of catch statements
{
// display exception to screen
System.out.println("Exception: " + e2);
}
finally
{
// always executed block
}
Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What are constants and how to create constants in java?
Why constructor has no return type?
What is the full name of java?
Can an integer be null java?
Can you call a method in a method?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
How many ways can you break a singleton class in java?
Is string is a keyword in java?
Explain spliterator in java8?
What is a key in java?
What is function overriding and overloading in java?
What are the common uses of "this" keyword in java ?
What’s the difference between unit, integration and functional testing?
Is null an object java?