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 streams in java 8?
What is the final blank variable?
Is null a string or object in java?
What are different types of multitasking?
What is java abstraction with example?
When a byte datatype is used?
Can we override the static method?
What is the meaning of flag day?
What are the advantages of java?
Do I need to import java.lang package any time? Why?
Explain java coding standards for methods?
What are the restrictions that are applied to the java static methods?
What is meant by the value of a variable?
Is java call by reference?
What is jee6?