Answer Posted / k.k
ALL ANSWERS GIVEN ABOVE ARE WRITE.........
BUT
ONLY CASE THAT CAN SUPPRESS THE FINALY BLOCK IS
public class SupressFinallyExample
{
public static void main(String args[])
{
try
{
// the code that may cause an exception
//System.exit(0);
}
catch (Exception e)
{
System.exit(0);//if exception occure..
}
finally
{
// code to be executed irrespective of the
occurrence of exception
}
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is thread count in java?
What is strings in java?
Does java have a compiler?
What are parameters in a method?
Why do we create threads in java?
What are static blocks and static initalizers in java ?
Which is faster string or stringbuilder?
What is mean by collections in java?
How to create a base64 decoder in java8?
What are disadvantages of java?
Describe method overriding
Explain differences between checked and unchecked exceptions in java?
What is thread safe in java?
Can you explain the private protected field modifier?
What is unmodifiable list in java?